! function(e, t) {
	"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define &&
		define.amd ? define([], t) : "object" == typeof exports ? exports.websdk = t() : e.websdk = t()
}(window, (function() {
	return function(e) {
		var t = {};

		function r(o) {
			if (t[o]) return t[o].exports;
			var i = t[o] = {
				i: o,
				l: !1,
				exports: {}
			};
			return e[o].call(i.exports, i, i.exports, r), i.l = !0, i.exports
		}
		return r.m = e, r.c = t, r.d = function(e, t, o) {
			r.o(e, t) || Object.defineProperty(e, t, {
				enumerable: !0,
				get: o
			})
		}, r.r = function(e) {
			"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol
				.toStringTag, {
					value: "Module"
				}), Object.defineProperty(e, "__esModule", {
				value: !0
			})
		}, r.t = function(e, t) {
			if (1 & t && (e = r(e)), 8 & t) return e;
			if (4 & t && "object" == typeof e && e && e.__esModule) return e;
			var o = Object.create(null);
			if (r.r(o), Object.defineProperty(o, "default", {
					enumerable: !0,
					value: e
				}), 2 & t && "string" != typeof e)
				for (var i in e) r.d(o, i, function(t) {
					return e[t]
				}.bind(null, i));
			return o
		}, r.n = function(e) {
			var t = e && e.__esModule ? function() {
				return e.default
			} : function() {
				return e
			};
			return r.d(t, "a", t), t
		}, r.o = function(e, t) {
			return Object.prototype.hasOwnProperty.call(e, t)
		}, r.p = "/Users/zhangdong/code/kefu-fe/websdk/packages/sdk", r(r.s = 157)
	}([function(e, t, r) {
			"use strict";
			e.exports = function(e) {
				return e && e.__esModule ? e : {
					default: e
				}
			}
		}, , , function(e, t, r) {
			"use strict";
			var o = r(0)(r(4)),
				i = e.exports,
				n = r(95);
			i.LongBits = r(66), i.Long = r(159), i.pool = r(160), i.float = r(161), i.asPromise = r(
				162), i.EventEmitter = r(163), i.path = r(164), i.base64 = r(96), i.utf8 = r(39), i
				.compareFieldsById = function(e, t) {
					return e.id - t.id
				}, i.toArray = function(e) {
					if (e) {
						for (var t = Object.keys(e), r = new Array(t.length), o = 0; o < t.length;) r[
							o] = e[t[o++]];
						return r
					}
					return []
				}, i.toObject = function(e) {
					for (var t = {}, r = 0; r < e.length;) {
						var o = e[r++],
							i = e[r++];
						void 0 !== i && (t[o] = i)
					}
					return t
				}, i.isString = function(e) {
					return "string" == typeof e || e instanceof String
				};
			i.isReserved = function(e) {
					return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/
						.test(e)
				}, i.isObject = function(e) {
					return e && "object" === (0, o.default)(e)
				}, i.Array = "undefined" != typeof Uint8Array ? Uint8Array : Array, i.oneOfGetter =
				function(e) {
					for (var t = {}, r = 0; r < e.length; ++r) t[e[r]] = 1;
					return function() {
						for (var e = Object.keys(this), r = e.length - 1; r > -1; --r)
							if (1 === t[e[r]] && void 0 !== this[e[r]] && null !== this[e[r]])
								return e[r]
					}
				}, i.oneOfSetter = function(e) {
					return function(t) {
						for (var r = 0; r < e.length; ++r) e[r] !== t && delete this[e[r]]
					}
				}, i.merge = function(e, t, r) {
					for (var o = Object.keys(t), i = 0; i < o.length; ++i) void 0 !== e[o[i]] && r || (
						e[o[i]] = t[o[i]]);
					return e
				}, i.decorateType = function(e, t) {
					if (e.$type) return t && e.$type.name !== t && (i.decorateRoot.remove(e.$type), e
						.$type.name = t, i.decorateRoot.add(e.$type)), e.$type;
					Type || (Type = r(22));
					var o = new Type(t || e.name);
					return i.decorateRoot.add(o), o.ctor = e, Object.defineProperty(e, "$type", {
						value: o,
						enumerable: !1
					}), Object.defineProperty(e.prototype, "$type", {
						value: o,
						enumerable: !1
					}), o
				}, i.emptyArray = Object.freeze ? Object.freeze([]) : [], i.emptyObject = Object
				.freeze ? Object.freeze({}) : {}, i.longToHash = function(e) {
					return e ? i.LongBits.from(e).toHash() : i.LongBits.zeroHash
				}, i.copy = function(e) {
					if ("object" != (0, o.default)(e)) return e;
					var t = {};
					for (var r in e) t[r] = e[r];
					return t
				}, i.deepCopy = function e(t) {
					if ("object" != (0, o.default)(t)) return t;
					var r = {};
					for (var i in t) r[i] = e(t[i]);
					return r
				}, i.ProtocolError = function(e) {
					function t(e, r) {
						if (!(this instanceof t)) return new t(e, r);
						Object.defineProperty(this, "message", {
								get: function() {
									return e
								}
							}), Error.captureStackTrace ? Error.captureStackTrace(this, t) : Object
							.defineProperty(this, "stack", {
								value: (new Error).stack || ""
							}), r && merge(this, r)
					}
					return (t.prototype = Object.create(Error.prototype)).constructor = t, Object
						.defineProperty(t.prototype, "name", {
							get: function() {
								return e
							}
						}), t.prototype.toString = function() {
							return this.name + ": " + this.message
						}, t
				}, i.toJSONOptions = {
					longs: String,
					enums: String,
					bytes: String,
					json: !0
				}, i.Buffer = null, i.newBuffer = function(e) {
					return "number" == typeof e ? new i.Array(e) : "undefined" == typeof Uint8Array ?
						e : new Uint8Array(e)
				}, i.stringToBytes = function(e) {
					var t, r, o = [];
					t = e.length;
					for (var i = 0; i < t; i++)(r = e.charCodeAt(i)) >= 65536 && r <= 1114111 ? (o.push(
							r >> 18 & 7 | 240), o.push(r >> 12 & 63 | 128), o.push(r >> 6 & 63 |
							128), o.push(63 & r | 128)) : r >= 2048 && r <= 65535 ? (o.push(r >> 12 &
							15 | 224), o.push(r >> 6 & 63 | 128), o.push(63 & r | 128)) : r >= 128 &&
						r <= 2047 ? (o.push(r >> 6 & 31 | 192), o.push(63 & r | 128)) : o.push(255 & r);
					return o
				}, i.byteToString = function(e) {
					if ("string" == typeof e) return e;
					for (var t = "", r = e, o = 0; o < r.length; o++) {
						var i = r[o].toString(2),
							n = i.match(/^1+?(?=0)/);
						if (n && 8 == i.length) {
							for (var s = n[0].length, a = r[o].toString(2).slice(7 - s), u = 1; u <
								s; u++) a += r[u + o].toString(2).slice(2);
							t += String.fromCharCode(parseInt(a, 2)), o += s - 1
						} else t += String.fromCharCode(r[o])
					}
					return t
				}, i.isInteger = Number.isInteger || function(e) {
					return "number" == typeof e && isFinite(e) && Math.floor(e) === e
				}, Object.defineProperty(i, "decorateRoot", {
					get: function() {
						return n.decorated || (n.decorated = new(r(40)))
					}
				})
		}, function(e, t, r) {
			"use strict";

			function o(t) {
				return "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? e.exports =
					o = function(e) {
						return typeof e
					} : e.exports = o = function(e) {
						return e && "function" == typeof Symbol && e.constructor === Symbol && e !==
							Symbol.prototype ? "symbol" : typeof e
					}, o(t)
			}
			e.exports = o
		}, , , function(e, t, r) {
			"use strict";
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var o = function() {
				return {
					WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR: 0,
					WEBIM_CONNCTION_OPEN_ERROR: 1,
					WEBIM_CONNCTION_AUTH_ERROR: 2,
					WEBIM_CONNCTION_OPEN_USERGRID_ERROR: 3,
					WEBIM_CONNCTION_ATTACH_ERROR: 4,
					WEBIM_CONNCTION_ATTACH_USERGRID_ERROR: 5,
					WEBIM_CONNCTION_REOPEN_ERROR: 6,
					WEBIM_CONNCTION_SERVER_CLOSE_ERROR: 7,
					WEBIM_CONNCTION_SERVER_ERROR: 8,
					WEBIM_CONNCTION_IQ_ERROR: 9,
					WEBIM_CONNCTION_USER_REMOVED: 207,
					WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE: 206,
					WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD: 216,
					WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE: 217,
					WEBIM_CONNCTION_PING_ERROR: 10,
					WEBIM_CONNCTION_NOTIFYVERSION_ERROR: 11,
					WEBIM_CONNCTION_GETROSTER_ERROR: 12,
					WEBIM_CONNCTION_CROSSDOMAIN_ERROR: 13,
					WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES: 14,
					WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR: 15,
					WEBIM_CONNCTION_DISCONNECTED: 16,
					WEBIM_CONNCTION_AJAX_ERROR: 17,
					WEBIM_CONNCTION_JOINROOM_ERROR: 18,
					WEBIM_CONNCTION_GETROOM_ERROR: 19,
					WEBIM_CONNCTION_GETROOMINFO_ERROR: 20,
					WEBIM_CONNCTION_GETROOMMEMBER_ERROR: 21,
					WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR: 22,
					WEBIM_CONNCTION_LOAD_CHATROOM_ERROR: 23,
					WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR: 24,
					WEBIM_CONNCTION_JOINCHATROOM_ERROR: 25,
					WEBIM_CONNCTION_QUITCHATROOM_ERROR: 26,
					WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR: 27,
					WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR: 28,
					WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR: 29,
					WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR: 30,
					WEBIM_CONNCTION_CALLBACK_INNER_ERROR: 31,
					WEBIM_CONNCTION_CLIENT_OFFLINE: 32,
					WEBIM_CONNCTION_CLIENT_LOGOUT: 33,
					WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR: 34,
					WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP: 35,
					WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP: 36,
					WEBIM_CONNECTION_ACCEPT_JOIN_GROUP: 37,
					WEBIM_CONNECTION_DECLINE_JOIN_GROUP: 38,
					WEBIM_CONNECTION_CLOSED: 39,
					WEBIM_CONNECTION_ERROR: 40,
					WEBIM_UPLOADFILE_BROWSER_ERROR: 100,
					WEBIM_UPLOADFILE_ERROR: 101,
					WEBIM_UPLOADFILE_NO_LOGIN: 102,
					WEBIM_UPLOADFILE_NO_FILE: 103,
					WEBIM_DOWNLOADFILE_ERROR: 200,
					WEBIM_DOWNLOADFILE_NO_LOGIN: 201,
					WEBIM_DOWNLOADFILE_BROWSER_ERROR: 202,
					WEBIM_MESSAGE_REC_TEXT: 300,
					WEBIM_MESSAGE_REC_TEXT_ERROR: 301,
					WEBIM_MESSAGE_REC_EMOTION: 302,
					WEBIM_MESSAGE_REC_PHOTO: 303,
					WEBIM_MESSAGE_REC_AUDIO: 304,
					WEBIM_MESSAGE_REC_AUDIO_FILE: 305,
					WEBIM_MESSAGE_REC_VEDIO: 306,
					WEBIM_MESSAGE_REC_VEDIO_FILE: 307,
					WEBIM_MESSAGE_REC_FILE: 308,
					WEBIM_MESSAGE_SED_TEXT: 309,
					WEBIM_MESSAGE_SED_EMOTION: 310,
					WEBIM_MESSAGE_SED_PHOTO: 311,
					WEBIM_MESSAGE_SED_AUDIO: 312,
					WEBIM_MESSAGE_SED_AUDIO_FILE: 313,
					WEBIM_MESSAGE_SED_VEDIO: 314,
					WEBIM_MESSAGE_SED_VEDIO_FILE: 315,
					WEBIM_MESSAGE_SED_FILE: 316,
					WEBIM_MESSAGE_SED_ERROR: 317,
					STATUS_INIT: 400,
					STATUS_DOLOGIN_USERGRID: 401,
					STATUS_DOLOGIN_IM: 402,
					STATUS_OPENED: 403,
					STATUS_CLOSING: 404,
					STATUS_CLOSED: 405,
					STATUS_ERROR: 406,
					GROUP_NOT_EXIST: 605,
					GROUP_NOT_JOINED: 602,
					MESSAGE_RECALL_TIME_LIMIT: 504,
					SERVICE_NOT_ENABLED: 505,
					SERVICE_NOT_ALLOW_MESSAGING: 506,
					SERVER_UNKNOWN_ERROR: 503,
					MESSAGE_INCLUDE_ILLEGAL_CONTENT: 501,
					PERMISSION_DENIED: 603,
					WEBIM_LOAD_MSG_ERROR: 604,
					SDK_RUNTIME_ERROR: 999
				}
			};
			t.default = o
		}, function(e, t, r) {
			"use strict";
			e.exports = i;
			var o = null;
			try {
				o = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1,
					0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127,
					3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3,
					109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105,
					118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101,
					109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,
					10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1,
					173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132,
					126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126,
					32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173,
					66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167,
					11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2,
					173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36,
					0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32,
					134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66,
					32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32,
					1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132,
					130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
				])), {}).exports
			} catch (e) {}

			function i(e, t, r) {
				this.low = 0 | e, this.high = 0 | t, this.unsigned = !!r
			}

			function n(e) {
				return !0 === (e && e.__isLong__)
			}
			i.prototype.__isLong__, Object.defineProperty(i.prototype, "__isLong__", {
				value: !0
			}), i.isLong = n;
			var s = {},
				a = {};

			function u(e, t) {
				var r, o, i;
				return t ? (i = 0 <= (e >>>= 0) && e < 256) && (o = a[e]) ? o : (r = c(e, (0 | e) < 0 ?
					-1 : 0, !0), i && (a[e] = r), r) : (i = -128 <= (e |= 0) && e < 128) && (o = s[
					e]) ? o : (r = c(e, e < 0 ? -1 : 0, !1), i && (s[e] = r), r)
			}

			function l(e, t) {
				if (isNaN(e)) return t ? _ : v;
				if (t) {
					if (e < 0) return _;
					if (e >= y) return T
				} else {
					if (e <= -m) return I;
					if (e + 1 >= m) return b
				}
				return e < 0 ? l(-e, t).neg() : c(e % f | 0, e / f | 0, t)
			}

			function c(e, t, r) {
				return new i(e, t, r)
			}
			i.fromInt = u, i.fromNumber = l, i.fromBits = c;
			var p = Math.pow;

			function h(e, t, r) {
				if (0 === e.length) throw Error("empty string");
				if ("NaN" === e || "Infinity" === e || "+Infinity" === e || "-Infinity" === e) return v;
				if ("number" == typeof t ? (r = t, t = !1) : t = !!t, (r = r || 10) < 2 || 36 < r)
				throw RangeError("radix");
				var o;
				if ((o = e.indexOf("-")) > 0) throw Error("interior hyphen");
				if (0 === o) return h(e.substring(1), t, r).neg();
				for (var i = l(p(r, 8)), n = v, s = 0; s < e.length; s += 8) {
					var a = Math.min(8, e.length - s),
						u = parseInt(e.substring(s, s + a), r);
					if (a < 8) {
						var c = l(p(r, a));
						n = n.mul(c).add(l(u))
					} else n = (n = n.mul(i)).add(l(u))
				}
				return n.unsigned = t, n
			}

			function d(e, t) {
				return "number" == typeof e ? l(e, t) : "string" == typeof e ? h(e, t) : c(e.low, e
					.high, "boolean" == typeof t ? t : e.unsigned)
			}
			i.fromString = h, i.fromValue = d;
			var f = 4294967296,
				y = f * f,
				m = y / 2,
				g = u(1 << 24),
				v = u(0);
			i.ZERO = v;
			var _ = u(0, !0);
			i.UZERO = _;
			var N = u(1);
			i.ONE = N;
			var E = u(1, !0);
			i.UONE = E;
			var O = u(-1);
			i.NEG_ONE = O;
			var b = c(-1, 2147483647, !1);
			i.MAX_VALUE = b;
			var T = c(-1, -1, !0);
			i.MAX_UNSIGNED_VALUE = T;
			var I = c(0, -2147483648, !1);
			i.MIN_VALUE = I;
			var C = i.prototype;
			C.toInt = function() {
				return this.unsigned ? this.low >>> 0 : this.low
			}, C.toNumber = function() {
				return this.unsigned ? (this.high >>> 0) * f + (this.low >>> 0) : this.high * f + (
					this.low >>> 0)
			}, C.toString = function(e) {
				if ((e = e || 10) < 2 || 36 < e) throw RangeError("radix");
				if (this.isZero()) return "0";
				if (this.isNegative()) {
					if (this.eq(I)) {
						var t = l(e),
							r = this.div(t),
							o = r.mul(t).sub(this);
						return r.toString(e) + o.toInt().toString(e)
					}
					return "-" + this.neg().toString(e)
				}
				for (var i = l(p(e, 6), this.unsigned), n = this, s = "";;) {
					var a = n.div(i),
						u = (n.sub(a.mul(i)).toInt() >>> 0).toString(e);
					if ((n = a).isZero()) return u + s;
					for (; u.length < 6;) u = "0" + u;
					s = "" + u + s
				}
			}, C.getHighBits = function() {
				return this.high
			}, C.getHighBitsUnsigned = function() {
				return this.high >>> 0
			}, C.getLowBits = function() {
				return this.low
			}, C.getLowBitsUnsigned = function() {
				return this.low >>> 0
			}, C.getNumBitsAbs = function() {
				if (this.isNegative()) return this.eq(I) ? 64 : this.neg().getNumBitsAbs();
				for (var e = 0 != this.high ? this.high : this.low, t = 31; t > 0 && 0 == (e & 1 <<
						t); t--);
				return 0 != this.high ? t + 33 : t + 1
			}, C.isZero = function() {
				return 0 === this.high && 0 === this.low
			}, C.eqz = C.isZero, C.isNegative = function() {
				return !this.unsigned && this.high < 0
			}, C.isPositive = function() {
				return this.unsigned || this.high >= 0
			}, C.isOdd = function() {
				return 1 == (1 & this.low)
			}, C.isEven = function() {
				return 0 == (1 & this.low)
			}, C.equals = function(e) {
				return n(e) || (e = d(e)), (this.unsigned === e.unsigned || this.high >>> 31 != 1 ||
					e.high >>> 31 != 1) && (this.high === e.high && this.low === e.low)
			}, C.eq = C.equals, C.notEquals = function(e) {
				return !this.eq(e)
			}, C.neq = C.notEquals, C.ne = C.notEquals, C.lessThan = function(e) {
				return this.comp(e) < 0
			}, C.lt = C.lessThan, C.lessThanOrEqual = function(e) {
				return this.comp(e) <= 0
			}, C.lte = C.lessThanOrEqual, C.le = C.lessThanOrEqual, C.greaterThan = function(e) {
				return this.comp(e) > 0
			}, C.gt = C.greaterThan, C.greaterThanOrEqual = function(e) {
				return this.comp(e) >= 0
			}, C.gte = C.greaterThanOrEqual, C.ge = C.greaterThanOrEqual, C.compare = function(e) {
				if (n(e) || (e = d(e)), this.eq(e)) return 0;
				var t = this.isNegative(),
					r = e.isNegative();
				return t && !r ? -1 : !t && r ? 1 : this.unsigned ? e.high >>> 0 > this.high >>>
					0 || e.high === this.high && e.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(e)
					.isNegative() ? -1 : 1
			}, C.comp = C.compare, C.negate = function() {
				return !this.unsigned && this.eq(I) ? I : this.not().add(N)
			}, C.neg = C.negate, C.add = function(e) {
				n(e) || (e = d(e));
				var t = this.high >>> 16,
					r = 65535 & this.high,
					o = this.low >>> 16,
					i = 65535 & this.low,
					s = e.high >>> 16,
					a = 65535 & e.high,
					u = e.low >>> 16,
					l = 0,
					p = 0,
					h = 0,
					f = 0;
				return h += (f += i + (65535 & e.low)) >>> 16, p += (h += o + u) >>> 16, l += (p +=
					r + a) >>> 16, l += t + s, c((h &= 65535) << 16 | (f &= 65535), (l &=
					65535) << 16 | (p &= 65535), this.unsigned)
			}, C.subtract = function(e) {
				return n(e) || (e = d(e)), this.add(e.neg())
			}, C.sub = C.subtract, C.multiply = function(e) {
				if (this.isZero()) return v;
				if (n(e) || (e = d(e)), o) return c(o.mul(this.low, this.high, e.low, e.high), o
					.get_high(), this.unsigned);
				if (e.isZero()) return v;
				if (this.eq(I)) return e.isOdd() ? I : v;
				if (e.eq(I)) return this.isOdd() ? I : v;
				if (this.isNegative()) return e.isNegative() ? this.neg().mul(e.neg()) : this.neg()
					.mul(e).neg();
				if (e.isNegative()) return this.mul(e.neg()).neg();
				if (this.lt(g) && e.lt(g)) return l(this.toNumber() * e.toNumber(), this.unsigned);
				var t = this.high >>> 16,
					r = 65535 & this.high,
					i = this.low >>> 16,
					s = 65535 & this.low,
					a = e.high >>> 16,
					u = 65535 & e.high,
					p = e.low >>> 16,
					h = 65535 & e.low,
					f = 0,
					y = 0,
					m = 0,
					_ = 0;
				return m += (_ += s * h) >>> 16, y += (m += i * h) >>> 16, m &= 65535, y += (m +=
						s * p) >>> 16, f += (y += r * h) >>> 16, y &= 65535, f += (y += i * p) >>>
					16, y &= 65535, f += (y += s * u) >>> 16, f += t * h + r * p + i * u + s * a, c(
						(m &= 65535) << 16 | (_ &= 65535), (f &= 65535) << 16 | (y &= 65535), this
						.unsigned)
			}, C.mul = C.multiply, C.divide = function(e) {
				if (n(e) || (e = d(e)), e.isZero()) throw Error("division by zero");
				var t, r, i;
				if (o) return this.unsigned || -2147483648 !== this.high || -1 !== e.low || -1 !== e
					.high ? c((this.unsigned ? o.div_u : o.div_s)(this.low, this.high, e.low, e
						.high), o.get_high(), this.unsigned) : this;
				if (this.isZero()) return this.unsigned ? _ : v;
				if (this.unsigned) {
					if (e.unsigned || (e = e.toUnsigned()), e.gt(this)) return _;
					if (e.gt(this.shru(1))) return E;
					i = _
				} else {
					if (this.eq(I)) return e.eq(N) || e.eq(O) ? I : e.eq(I) ? N : (t = this.shr(1)
						.div(e).shl(1)).eq(v) ? e.isNegative() ? N : O : (r = this.sub(e
						.mul(t)), i = t.add(r.div(e)));
					if (e.eq(I)) return this.unsigned ? _ : v;
					if (this.isNegative()) return e.isNegative() ? this.neg().div(e.neg()) : this
						.neg().div(e).neg();
					if (e.isNegative()) return this.div(e.neg()).neg();
					i = v
				}
				for (r = this; r.gte(e);) {
					t = Math.max(1, Math.floor(r.toNumber() / e.toNumber()));
					for (var s = Math.ceil(Math.log(t) / Math.LN2), a = s <= 48 ? 1 : p(2, s - 48),
							u = l(t), h = u.mul(e); h.isNegative() || h.gt(r);) h = (u = l(t -= a,
						this.unsigned)).mul(e);
					u.isZero() && (u = N), i = i.add(u), r = r.sub(h)
				}
				return i
			}, C.div = C.divide, C.modulo = function(e) {
				return n(e) || (e = d(e)), o ? c((this.unsigned ? o.rem_u : o.rem_s)(this.low, this
					.high, e.low, e.high), o.get_high(), this.unsigned) : this.sub(this.div(e)
					.mul(e))
			}, C.mod = C.modulo, C.rem = C.modulo, C.not = function() {
				return c(~this.low, ~this.high, this.unsigned)
			}, C.and = function(e) {
				return n(e) || (e = d(e)), c(this.low & e.low, this.high & e.high, this.unsigned)
			}, C.or = function(e) {
				return n(e) || (e = d(e)), c(this.low | e.low, this.high | e.high, this.unsigned)
			}, C.xor = function(e) {
				return n(e) || (e = d(e)), c(this.low ^ e.low, this.high ^ e.high, this.unsigned)
			}, C.shiftLeft = function(e) {
				return n(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this.low << e,
					this.high << e | this.low >>> 32 - e, this.unsigned) : c(0, this.low << e -
					32, this.unsigned)
			}, C.shl = C.shiftLeft, C.shiftRight = function(e) {
				return n(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this.low >>> e |
					this.high << 32 - e, this.high >> e, this.unsigned) : c(this.high >> e - 32,
					this.high >= 0 ? 0 : -1, this.unsigned)
			}, C.shr = C.shiftRight, C.shiftRightUnsigned = function(e) {
				if (n(e) && (e = e.toInt()), 0 === (e &= 63)) return this;
				var t = this.high;
				return e < 32 ? c(this.low >>> e | t << 32 - e, t >>> e, this.unsigned) : c(32 ===
					e ? t : t >>> e - 32, 0, this.unsigned)
			}, C.shru = C.shiftRightUnsigned, C.shr_u = C.shiftRightUnsigned, C.toSigned =
			function() {
				return this.unsigned ? c(this.low, this.high, !1) : this
			}, C.toUnsigned = function() {
				return this.unsigned ? this : c(this.low, this.high, !0)
			}, C.toBytes = function(e) {
				return e ? this.toBytesLE() : this.toBytesBE()
			}, C.toBytesLE = function() {
				var e = this.high,
					t = this.low;
				return [255 & t, t >>> 8 & 255, t >>> 16 & 255, t >>> 24, 255 & e, e >>> 8 & 255,
					e >>> 16 & 255, e >>> 24
				]
			}, C.toBytesBE = function() {
				var e = this.high,
					t = this.low;
				return [e >>> 24, e >>> 16 & 255, e >>> 8 & 255, 255 & e, t >>> 24, t >>> 16 & 255,
					t >>> 8 & 255, 255 & t
				]
			}, i.fromBytes = function(e, t, r) {
				return r ? i.fromBytesLE(e, t) : i.fromBytesBE(e, t)
			}, i.fromBytesLE = function(e, t) {
				return new i(e[0] | e[1] << 8 | e[2] << 16 | e[3] << 24, e[4] | e[5] << 8 | e[6] <<
					16 | e[7] << 24, t)
			}, i.fromBytesBE = function(e, t) {
				return new i(e[4] << 24 | e[5] << 16 | e[6] << 8 | e[7], e[0] << 24 | e[1] << 16 |
					e[2] << 8 | e[3], t)
			}
		}, , function(e, t, r) {
			"use strict";
			var o = r(0)(r(4));
			e.exports = s;
			var i = r(23);
			((s.prototype = Object.create(i.prototype)).constructor = s).className = "Enum";
			var n = r(33);

			function s(e, t, r, n, s) {
				if (i.call(this, e, r), t && "object" !== (0, o.default)(t)) throw TypeError(
					"values must be an object");
				if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment =
					n, this.comments = s || {}, this.reserved = void 0, t)
					for (var a = Object.keys(t), u = 0; u < a.length; ++u) "number" == typeof t[a[u]] &&
						(this.valuesById[this.values[a[u]] = t[a[u]]] = a[u])
			}
			s.fromJSON = function(e, t) {
				var r = new s(e, t.values, t.options, t.comment, t.comments);
				return r.reserved = t.reserved, r
			}, s.prototype.toJSON = function(e) {
				var t = !!e && Boolean(e.keepComments);
				return util.toObject(["options", this.options, "values", this.values, "reserved",
					this.reserved && this.reserved.length ? this.reserved : void 0,
					"comment", t ? this.comment : void 0, "comments", t ? this.comments :
					void 0
				])
			}, s.prototype.add = function(e, t, r) {
				if (!util.isString(e)) throw TypeError("name must be a string");
				if (!util.isInteger(t)) throw TypeError("id must be an integer");
				if (void 0 !== this.values[e]) throw Error("duplicate name '" + e + "' in " + this);
				if (this.isReservedId(t)) throw Error("id " + t + " is reserved in " + this);
				if (this.isReservedName(e)) throw Error("name '" + e + "' is reserved in " + this);
				if (void 0 !== this.valuesById[t]) {
					if (!this.options || !this.options.allow_alias) throw Error("duplicate id " +
						t + " in " + this);
					this.values[e] = t
				} else this.valuesById[this.values[e] = t] = e;
				return this.comments[e] = r || null, this
			}, s.prototype.remove = function(e) {
				if (!util.isString(e)) throw TypeError("name must be a string");
				var t = this.values[e];
				if (null == t) throw Error("name '" + e + "' does not exist in " + this);
				return delete this.valuesById[t], delete this.values[e], delete this.comments[e],
					this
			}, s.prototype.isReservedId = function(e) {
				return n.isReservedId(this.reserved, e)
			}, s.prototype.isReservedName = function(e) {
				return n.isReservedName(this.reserved, e)
			}
		}, , , , function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i = o(r(4)),
				n = o(r(38)),
				s = o(r(57)),
				a = r(58),
				u = function(e) {},
				l = {},
				c = function() {
					function e(t, r, o) {
						(0, n.default)(this, e), this.name = t || "defaultLogger", this.currentLevel =
							void 0, this.useCookiePersist = void 0, this.storageLogLevelKey =
							"loglevel", this.levels = {
								TRACE: 0,
								DEBUG: 1,
								INFO: 2,
								WARN: 3,
								ERROR: 4,
								SILENT: 5
							}, this.logMethods = ["trace", "debug", "info", "warn", "error"], this
							.methodFactory = o || this.defaultMethodFactory;
						var i = this._getPersistedLevel();
						null == i && (i = null == r ? "WARN" : r), this.logs = [], this.config = {
							useCache: !1,
							maxCache: 3145728,
							color: "",
							background: ""
						}, this.logBytes = 0, this.setLevel(i, !1)
					}
					return (0, s.default)(e, [{
						key: "setConfig",
						value: function() {
							var e = arguments.length > 0 && void 0 !== arguments[0] ?
								arguments[0] : {};
							this.config = e
						}
					}, {
						key: "getLevel",
						value: function() {
							return this.currentLevel
						}
					}, {
						key: "setLevel",
						value: function(e, t, r) {
							if ("string" == typeof e && void 0 !== this.levels[e
									.toUpperCase()] && (e = this.levels[e
								.toUpperCase()]), !("number" == typeof e && e >= 0 &&
									e <= this.levels.SILENT))
							throw "log.setLevel() called with invalid level: " + e;
							if (this.currentLevel = e, !1 !== t && this._persistLevel(
								e), this.replaceLoggingMethods(e, r), "undefined" ==
								typeof console && e < self.levels.SILENT)
							return "No console available for logging"
						}
					}, {
						key: "setDefaultLevel",
						value: function() {
							_getPersistedLevel() || this.setLevel(level, !1)
						}
					}, {
						key: "enableAll",
						value: function(e) {
							this.setLevel(this.levels.TRACE, e)
						}
					}, {
						key: "disableAll",
						value: function(e) {
							this.setLevel(this.levels.SILENT, e)
						}
					}, {
						key: "getLogs",
						value: function() {
							return this.logs
						}
					}, {
						key: "download",
						value: function() {
							if ("undefined" != typeof window && "undefined" !=
								typeof document) {
								var e = this.getLogs().join("\n"),
									t = new Blob([e], {
										type: "text/plain;charset=UTF-8"
									}),
									r = window.URL.createObjectURL(t),
									o = (new FormData, document.createElement("a"));
								o.style.display = "none", o.href = r, o.setAttribute(
										"download", "sdklog"), document.body
									.appendChild(o), o.click()
							}
						}
					}, {
						key: "_bindMethod",
						value: function(e, t, r) {
							var o = e[t];
							if (r) return this._cacheLog;
							if ("function" == typeof o.bind) return o.bind(e);
							try {
								return Function.prototype.bind.call(o, e)
							} catch (t) {
								return function() {
									return Function.prototype.apply.apply(o, [e,
										arguments
									])
								}
							}
						}
					}, {
						key: "_cacheLog",
						value: function() {
							for (var e = (new Date).toLocaleString() + ": ", t = "", r =
									arguments.length, o = new Array(r), n = 0; n <
								r; n++) o[n] = arguments[n];
							o.forEach((function(e) {
								"object" === (0, i.default)(e) ? t += JSON
									.stringify(e) + " ": t += e + " "
							})), this._cacheLogCall(e + t)
						}
					}, {
						key: "_cacheLogCall",
						value: function(e) {
							var t = p(e),
								r = this.logBytes + t,
								o = this.config.maxCache;
							if (!(t >= o)) {
								if (r < o) this.logBytes += t;
								else
									for (var i = r - o, n = 0; n < i;) {
										var s = this.logs.shift();
										console.log("clearOutLog", s), void 0 !== s && (
											n += p(s))
									}
								this.logs.push(e)
							}
						}
					}, {
						key: "_getPersistedLevel",
						value: function() {
							var e;
							if ("undefined" == typeof window) return console.warn(
								"this lib can run in browser only!");
							if ("undefined" === (e = window.localStorage && window
									.localStorage[this.storageLogLevelKey])) {
								var t = window.document.cookie,
									r = t.indexOf(encodeURIComponent(this
										.storageLogLevelKey)); - 1 !== r && (e =
									/^([^;]+)/.exec(t.slice(r))[1])
							}
							return e || 5
						}
					}, {
						key: "_persistLevel",
						value: function(e) {
							var t = this.logMethods[e] || "SILENT";
							if ("undefined" == typeof window) return console.warn(
								"this lib can run in browser only!");
							window.localStorage && (window.localStorage[this
									.storageLogLevelKey] = t), this.useCookiePersist &&
								(window.document.cookie = encodeURIComponent(this
									.storageLogLevelKey) + "=" + t + ";")
						}
					}, {
						key: "replaceLoggingMethods",
						value: function(e, t) {
							for (var r = 0; r < this.logMethods.length; r++) {
								var o = this.logMethods[r];
								this[o] = r < e ? u : this.methodFactory(o, e, t)
							}
							this.log = this.debug
						}
					}, {
						key: "defaultMethodFactory",
						value: function(e, t, r) {
							return this.realMethod(e) || this
								.enableLoggingWhenConsoleArrives.apply(this, arguments)
						}
					}, {
						key: "realMethod",
						value: function(e) {
							return "debug" === e && (e = "log"), "undefined" !=
								typeof console && ("trace" === e && a.isIE ? a
									.traceForIE : void 0 !== console[e] ? this
									._bindMethod(console, e, this.config.useCache) :
									void 0 !== console.log ? this._bindMethod(console,
										"log", this.config.useCache) : u)
						}
					}, {
						key: "enableLoggingWhenConsoleArrives",
						value: function(e, t, r) {
							return function() {
								"undefined" != typeof console && (
									replaceLoggingMethods.call(this, t, r),
									this[e].apply(this, arguments))
							}
						}
					}]), e
				}();

			function p(e) {
				for (var t = e.length, r = 0; r < e.length; r++) e.charCodeAt(r) > 255 && t++;
				return t
			}
			var h = new c;
			h.getLogger = function(e) {
				if ("string" != typeof e || "" === e) throw new TypeError(
					"You must supply a name when creating a logger.");
				var t = l[e];
				return t || (t = l[e] = new c(e, h.getLevel(), h.methodFactory)), t
			};
			var d = "undefined" != typeof window ? window.log : void 0;
			h.noConflict = function() {
				return "undefined" != typeof window && window.log === h && (window.log = d), h
			}, h.getLoggers = function() {
				return l
			};
			var f = h;
			t.default = f
		}, , function(e, t, r) {
			"use strict";
			var o = r(0)(r(4));
			e.exports = c;
			var i, n, s, a, u = r(23);
			((c.prototype = Object.create(u.prototype)).constructor = c).className = "Field";
			var l = /^required|optional|repeated$/;

			function c(e, t, r, o, i, a, c) {
				if (s.isObject(o) ? (c = i, a = o, o = i = void 0) : s.isObject(i) && (c = a, a = i, i =
						void 0), u.call(this, e, a), !s.isInteger(t) || t < 0) throw TypeError(
					"id must be a non-negative integer");
				if (!s.isString(r)) throw TypeError("type must be a string");
				if (void 0 !== o && !l.test(o = o.toString().toLowerCase())) throw TypeError(
					"rule must be a string rule");
				if (void 0 !== i && !s.isString(i)) throw TypeError("extend must be a string");
				this.rule = o && "optional" !== o ? o : void 0, this.type = r, this.id = t, this
					.extend = i || void 0, this.required = "required" === o, this.optional = !this
					.required, this.repeated = "repeated" === o, this.map = !1, this.message = null,
					this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = !
					!s.Long && void 0 !== n.long[r], this.bytes = "bytes" === r, this.resolvedType =
					null, this.extensionField = null, this.declaringField = null, this._packed = null,
					this.comment = c
			}
			c.fromJSON = function(e, t) {
				return new c(e, t.id, t.type, t.rule, t.extend, t.options, t.comment)
			}, Object.defineProperty(c.prototype, "packed", {
				get: function() {
					return null === this._packed && (this._packed = !1 !== this.getOption(
						"packed")), this._packed
				}
			}), c.prototype.setOption = function(e, t, r) {
				return "packed" === e && (this._packed = null), u.prototype.setOption.call(this, e,
					t, r)
			}, c.prototype.toJSON = function(e) {
				var t = !!e && Boolean(e.keepComments);
				return s.toObject(["rule", "optional" !== this.rule && this.rule || void 0, "type",
					this.type, "id", this.id, "extend", this.extend, "options", this
					.options, "comment", t ? this.comment : void 0
				])
			}, c.prototype.resolve = function() {
				if (this.resolved) return this;
				if (void 0 === (this.typeDefault = n.defaults[this.type]) && (this.resolvedType = (
							this.declaringField ? this.declaringField.parent : this.parent)
						.lookupTypeOrEnum(this.type), this.resolvedType instanceof a ? this
						.typeDefault = null : this.typeDefault = this.resolvedType.values[Object
							.keys(this.resolvedType.values)[0]]), this.options && null != this
					.options.default && (this.typeDefault = this.options.default, this
						.resolvedType instanceof i && "string" == typeof this.typeDefault && (this
							.typeDefault = this.resolvedType.values[this.typeDefault])), this
					.options && (!0 !== this.options.packed && (void 0 === this.options.packed || !
							this.resolvedType || this.resolvedType instanceof i) || delete this
						.options.packed, Object.keys(this.options).length || (this.options = void 0)
						), this.long) this.typeDefault = s.Long.fromNumber(this.typeDefault, "u" ===
					this.type.charAt(0)), Object.freeze && Object.freeze(this.typeDefault);
				else if (this.bytes && "string" == typeof this.typeDefault) {
					var e;
					s.utf8.write(this.typeDefault, e = s.newBuffer(s.utf8.length(this.typeDefault)),
						0), this.typeDefault = e
				}
				return this.map ? this.defaultValue = s.emptyObject : this.repeated ? this
					.defaultValue = s.emptyArray : this.defaultValue = this.typeDefault, this
					.parent instanceof a && (this.parent.ctor.prototype[this.name] = this
						.defaultValue), u.prototype.resolve.call(this)
			}, c.d = function(e, t, r, i) {
				return "function" == typeof t ? t = s.decorateType(t).name : t && "object" === (0, o
						.default)(t) && (t = s.decorateEnum(t).name),
					function(o, n) {
						s.decorateType(o.constructor).add(new c(n, e, t, r, {
							default: i
						}))
					}
			}, c._configure = function() {
				a = r(22), i = r(10), n = r(24), s = r(3)
			}
		}, , , , , , function(e, t, r) {
			"use strict";
			e.exports = v;
			var o, i, n, s, a, u, l, c, p, h, d, f, y, m, g = r(33);

			function v(e, t) {
				g.call(this, e, t), this.fields = {}, this.oneofs = void 0, this.extensions = void 0,
					this.reserved = void 0, this.group = void 0, this._fieldsById = null, this
					._fieldsArray = null, this._oneofsArray = null, this._ctor = null
			}

			function _(e) {
				return e._fieldsById = e._fieldsArray = e._oneofsArray = null, delete e.encode, delete e
					.decode, delete e.verify, e
			}((v.prototype = Object.create(g.prototype)).constructor = v).className = "Type", Object
				.defineProperties(v.prototype, {
					fieldsById: {
						get: function() {
							if (this._fieldsById) return this._fieldsById;
							this._fieldsById = {};
							for (var e = Object.keys(this.fields), t = 0; t < e.length; ++t) {
								var r = this.fields[e[t]],
									o = r.id;
								if (this._fieldsById[o]) throw Error("duplicate id " + o +
									" in " + this);
								this._fieldsById[o] = r
							}
							return this._fieldsById
						}
					},
					fieldsArray: {
						get: function() {
							return this._fieldsArray || (this._fieldsArray = l.toArray(this
								.fields))
						}
					},
					oneofsArray: {
						get: function() {
							return this._oneofsArray || (this._oneofsArray = l.toArray(this
								.oneofs))
						}
					},
					ctor: {
						get: function() {
							return this._ctor || (this.ctor = v.generateConstructor(this))
						},
						set: function(e) {
							var t = e.prototype;
							t instanceof n || ((e.prototype = new n).constructor = e, l.merge(e
									.prototype, t)), e.$type = e.prototype.$type = this, l
								.merge(e, n, !0), l.merge(e.prototype, n, !0), this._ctor = e;
							for (var r = 0; r < this.fieldsArray.length; ++r) this._fieldsArray[
								r].resolve();
							var o = {};
							for (r = 0; r < this.oneofsArray.length; ++r) {
								var i = this._oneofsArray[r].resolve().name,
									s = function(e) {
										for (var t = {}, r = 0; r < e.length; ++r) t[e[r]] = 0;
										return {
											setter: function(r) {
												if (!(e.indexOf(r) < 0)) {
													t[r] = 1;
													for (var o = 0; o < e.length; ++o) e[
														o] !== r && delete this[e[o]]
												}
											},
											getter: function() {
												for (var e = Object.keys(this), r = e
														.length - 1; r > -1; --r)
													if (1 === t[e[r]] && void 0 !== this[e[
															r]] && null !== this[e[r]])
														return e[r]
											}
										}
									}(this._oneofsArray[r].oneof);
								o[i] = {
									get: s.getter,
									set: s.setter
								}
							}
							r && Object.defineProperties(e.prototype, o)
						}
					}
				}), v.generateConstructor = function(e) {
					return function(t) {
						for (var r, o = 0; o < e.fieldsArray.length; o++)(r = e._fieldsArray[o])
							.map ? this[r.name] = {} : r.repeated && (this[r.name] = []);
						if (t)
							for (var i = Object.keys(t), n = 0; n < i.length; ++n) null != t[i[
								n]] && (this[i[n]] = t[i[n]])
					}
				}, v.fromJSON = function(e, t) {
					var r = new v(e, t.options);
					r.extensions = t.extensions, r.reserved = t.reserved;
					for (var n = Object.keys(t.fields), a = 0; a < n.length; ++a) r.add((void 0 !== t
						.fields[n[a]].keyType ? m.fromJSON : i.fromJSON)(n[a], t.fields[n[a]]));
					if (t.oneofs)
						for (n = Object.keys(t.oneofs), a = 0; a < n.length; ++a) r.add(s.fromJSON(n[a],
							t.oneofs[n[a]]));
					if (t.nested)
						for (n = Object.keys(t.nested), a = 0; a < n.length; ++a) {
							var u = t.nested[n[a]];
							r.add((void 0 !== u.id ? i.fromJSON : void 0 !== u.fields ? v.fromJSON :
								void 0 !== u.values ? o.fromJSON : void 0 !== u.methods ? d
								.fromJSON : g.fromJSON)(n[a], u))
						}
					return t.extensions && t.extensions.length && (r.extensions = t.extensions), t
						.reserved && t.reserved.length && (r.reserved = t.reserved), t.group && (r
							.group = !0), t.comment && (r.comment = t.comment), r
				}, v.prototype.toJSON = function(e) {
					var t = g.prototype.toJSON.call(this, e),
						r = !!e && Boolean(e.keepComments);
					return {
						options: t && t.options || void 0,
						oneofs: g.arrayToJSON(this.oneofsArray, e),
						fields: g.arrayToJSON(this.fieldsArray.filter((function(e) {
							return !e.declaringField
						})), e) || {},
						extensions: this.extensions && this.extensions.length ? this.extensions :
							void 0,
						reserved: this.reserved && this.reserved.length ? this.reserved : void 0,
						group: this.group || void 0,
						nested: t && t.nested || void 0,
						comment: r ? this.comment : void 0
					}
				}, v.prototype.resolveAll = function() {
					for (var e = this.fieldsArray, t = 0; t < e.length;) e[t++].resolve();
					var r = this.oneofsArray;
					for (t = 0; t < r.length;) r[t++].resolve();
					return g.prototype.resolveAll.call(this)
				}, v.prototype.get = function(e) {
					return this.fields[e] || this.oneofs && this.oneofs[e] || this.nested && this
						.nested[e] || null
				}, v.prototype.add = function(e) {
					if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " + this);
					if (e instanceof i && void 0 === e.extend) {
						if (this._fieldsById && this._fieldsById[e.id]) throw Error("duplicate id " + e
							.id + " in " + this);
						if (this.isReservedId(e.id)) throw Error("id " + e.id + " is reserved in " +
							this);
						if (this.isReservedName(e.name)) throw Error("name '" + e.name +
							"' is reserved in " + this);
						return e.parent && e.parent.remove(e), this.fields[e.name] = e, e.message =
							this, e.onAdd(this), _(this)
					}
					return e instanceof s ? (this.oneofs || (this.oneofs = {}), this.oneofs[e.name] = e,
						e.onAdd(this), _(this)) : g.prototype.add.call(this, e)
				}, v.prototype.remove = function(e) {
					if (e instanceof i && void 0 === e.extend) {
						if (!this.fields || this.fields[e.name] !== e) throw Error(e +
							" is not a member of " + this);
						return delete this.fields[e.name], e.parent = null, e.onRemove(this), _(this)
					}
					if (e instanceof s) {
						if (!this.oneofs || this.oneofs[e.name] !== e) throw Error(e +
							" is not a member of " + this);
						return delete this.oneofs[e.name], e.parent = null, e.onRemove(this), _(this)
					}
					return g.prototype.remove.call(this, e)
				}, v.prototype.isReservedId = function(e) {
					return g.isReservedId(this.reserved, e)
				}, v.prototype.isReservedName = function(e) {
					return g.isReservedName(this.reserved, e)
				}, v.prototype.create = function(e) {
					return new this.ctor(e)
				}, v.prototype.setup = function() {
					for (var e = this.fullName, t = [], r = 0; r < this.fieldsArray.length; ++r) t.push(
						this._fieldsArray[r].resolve().resolvedType);
					this.encode = p(this)({
						Writer: a,
						types: t,
						util: l
					}), this.decode = h(this)({
						Reader: u,
						types: t,
						util: l
					}), this.verify = c(this)({
						types: t,
						util: l
					}), this.fromObject = y.fromObject(this)({
						types: t,
						util: l
					}), this.toObject = y.toObject(this)({
						types: t,
						util: l
					});
					var o = f[e];
					if (o) {
						var i = Object.create(this);
						i.fromObject = this.fromObject, this.fromObject = o.fromObject.bind(i), i
							.toObject = this.toObject, this.toObject = o.toObject.bind(i)
					}
					return this
				}, v.prototype.encode = function(e, t) {
					return this.setup().encode(e, t)
				}, v.prototype.encodeDelimited = function(e, t) {
					return this.encode(e, t && t.len ? t.fork() : t).ldelim()
				}, v.prototype.decode = function(e, t) {
					return this.setup().decode(e, t)
				}, v.prototype.decodeDelimited = function(e) {
					return e instanceof u || (e = u.create(e)), this.decode(e, e.uint32())
				}, v.prototype.verify = function(e) {
					return this.setup().verify(e)
				}, v.prototype.fromObject = function(e) {
					return this.setup().fromObject(e)
				}, v.prototype.toObject = function(e, t) {
					return this.setup().toObject(e, t)
				}, v.d = function(e) {
					return function(t) {
						l.decorateType(t, e)
					}
				}, v._configure = function() {
					o = r(10), i = r(16), n = r(69), s = r(34), a = r(94), u = r(101), l = r(3), c = r(
						102), p = r(103), h = r(104), d = r(41), f = r(105), y = r(106), m = r(67)
				}
		}, function(e, t, r) {
			"use strict";
			var o, i;

			function n(e, t) {
				if (!o.isString(e)) throw TypeError("name must be a string");
				if (t && !o.isObject(t)) throw TypeError("options must be an object");
				this.options = t, this.name = e, this.parent = null, this.resolved = !1, this.comment =
					null, this.filename = null
			}
			e.exports = n, n.className = "ReflectionObject", Object.defineProperties(n.prototype, {
				root: {
					get: function() {
						for (var e = this; null !== e.parent;) e = e.parent;
						return e
					}
				},
				fullName: {
					get: function() {
						for (var e = [this.name], t = this.parent; t;) e.unshift(t.name),
							t = t.parent;
						return e.join(".")
					}
				}
			}), n.prototype.toJSON = function() {
				throw Error()
			}, n.prototype.onAdd = function(e) {
				this.parent && this.parent !== e && this.parent.remove(this), this.parent = e, this
					.resolved = !1;
				var t = e.root;
				t instanceof i && t._handleAdd(this)
			}, n.prototype.onRemove = function(e) {
				var t = e.root;
				t instanceof i && t._handleRemove(this), this.parent = null, this.resolved = !1
			}, n.prototype.resolve = function() {
				return this.resolved || this.root instanceof i && (this.resolved = !0), this
			}, n.prototype.getOption = function(e) {
				if (this.options) return this.options[e]
			}, n.prototype.setOption = function(e, t, r) {
				return r && this.options && void 0 !== this.options[e] || ((this.options || (this
					.options = {}))[e] = t), this
			}, n.prototype.setOptions = function(e, t) {
				if (e)
					for (var r = Object.keys(e), o = 0; o < r.length; ++o) this.setOption(r[o], e[r[
						o]], t);
				return this
			}, n.prototype.toString = function() {
				var e = this.constructor.className,
					t = this.fullName;
				return t.length ? e + " " + t : e
			}, n._configure = function(e) {
				i = r(40), o = r(3)
			}
		}, function(e, t, r) {
			"use strict";
			var o = e.exports,
				i = r(3),
				n = ["double", "float", "int32", "uint32", "sint32", "fixed32", "sfixed32", "int64",
					"uint64", "sint64", "fixed64", "sfixed64", "bool", "string", "bytes"
				];

			function s(e, t) {
				var r = 0,
					o = {};
				for (t |= 0; r < e.length;) o[n[r + t]] = e[r++];
				return o
			}
			o.basic = s([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2, 2]), o.defaults = s([0, 0, 0, 0, 0,
				0, 0, 0, 0, 0, 0, 0, !1, "", i.emptyArray, null
			]), o.long = s([0, 0, 0, 1, 1], 7), o.mapKey = s([0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2],
				2), o.packed = s([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0]), o._configure =
		function() {
				i = r(3)
			}
		}, , , , function(e, t, r) {
			"use strict";

			function o(e) {
				return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ?
					function(e) {
						return typeof e
					} : function(e) {
						return e && "function" == typeof Symbol && e.constructor === Symbol && e !==
							Symbol.prototype ? "symbol" : typeof e
					})(e)
			}! function() {
				var e = "object" === o(t) && null !== t && "number" != typeof t.nodeType ? t :
					"undefined" != typeof self ? self : $.global,
					r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

				function i(e) {
					this.message = e
				}
				i.prototype = new Error, i.prototype.name = "InvalidCharacterError", e.btoa || (e.btoa =
					function(e) {
						for (var t, o, n = String(e), s = 0, a = r, u = ""; n.charAt(0 | s) || (a =
								"=", s % 1); u += a.charAt(63 & t >> 8 - s % 1 * 8)) {
							if ((o = n.charCodeAt(s += 3 / 4)) > 255) throw new i(
								"'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."
								);
							t = t << 8 | o
						}
						return u
					}), e.atob || (e.atob = function(e) {
					var t = String(e).replace(/[=]+$/, "");
					if (t.length % 4 == 1) throw new i(
						"'atob' failed: The string to be decoded is not correctly encoded."
						);
					for (var o, n, s = 0, a = 0, u = ""; n = t.charAt(a++); ~n && (o = s % 4 ?
							64 * o + n : n, s++ % 4) ? u += String.fromCharCode(255 & o >> (-2 *
							s & 6)) : 0) n = r.indexOf(n);
					return u
				})
			}()
		}, , function(e, t, r) {
			"use strict";
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var o = function e(t, r) {
				return !this instanceof e ? new e(t) : (this._msg = {}, "function" == typeof e[t] &&
					(e[t].prototype.setGroup = this.setGroup, e[t].prototype.setChatType = this
						.setChatType, this._msg = new e[t](r)), this._msg)
			};
			o.prototype.setGroup = function(e) {
				this.body.group = e
			}, o.prototype.setChatType = function(e) {
				this.body.chatType = e
			}, o.prototype._utils = {}, (o.read = function(e) {
				this.id = e, this.type = "read"
			}).prototype.set = function(e) {
				this.body = {
					id: this.id,
					type: this.type,
					ackId: e.id,
					to: e.to,
					from: e.from || ""
				}, e.msgConfig && (this.body.msgConfig = e.msgConfig), e.ackContent && (this
					.body.ackContent = e.ackContent)
			}, (o.delivery = function(e) {
				this.id = e, this.type = "delivery"
			}).prototype.set = function(e) {
				this.body = {
					id: this.id,
					type: this.type,
					ackId: e.ackId,
					to: e.to,
					from: e.from || ""
				}
			}, (o.channel = function(e) {
				this.id = e, this.type = "channel"
			}).prototype.set = function(e) {
				this.body = {
					id: this.id,
					type: this.type,
					to: e.to,
					chatType: e.chatType || "singleChat"
				}
			}, (o.txt = function(e) {
				this.id = e, this.type = "txt", this.body = {}
			}).prototype.set = function(e) {
				this.value = e.msg, this.body = {
					id: this.id,
					to: e.to,
					from: e.from || "",
					msg: this.value,
					type: this.type,
					roomType: e.roomType || !1,
					ext: e.ext || {},
					success: e.success,
					fail: e.fail,
					chatType: e.chatType || "singleChat"
				}, e.msgConfig && (this.body.msgConfig = e.msgConfig)
			}, (o.cmd = function(e) {
				this.id = e, this.type = "cmd", this.body = {}
			}).prototype.set = function(e) {
				this.body = {
					id: this.id,
					to: e.to,
					from: e.from || "",
					action: e.action,
					type: this.type,
					roomType: e.roomType || !1,
					chatType: e.chatType || "singleChat",
					ext: e.ext || {},
					success: e.success,
					fail: e.fail
				}
			}, (o.custom = function(e) {
				this.id = e, this.type = "custom", this.body = {}
			}).prototype.set = function(e) {
				this.body = {
					id: this.id,
					to: e.to,
					from: e.from || "",
					customEvent: e.customEvent,
					customExts: e.customExts,
					type: this.type,
					roomType: e.roomType || !1,
					chatType: e.chatType || "singleChat",
					ext: e.ext || {},
					success: e.success,
					fail: e.fail
				}
			}, (o.location = function(e) {
				this.id = e, this.type = "loc", this.body = {}
			}).prototype.set = function(e) {
				this.body = {
					id: this.id,
					to: e.to,
					from: e.from || "",
					type: this.type,
					roomType: e.roomType || !1,
					chatType: e.chatType || "singleChat",
					addr: e.addr,
					lat: e.lat,
					lng: e.lng,
					ext: e.ext || {},
					success: e.success,
					fail: e.fail
				}
			}, (o.img = function(e) {
				this.id = e, this.type = "img", this.body = {}
			}).prototype.set = function(e) {
				e.file = e.file || o.prototype._utils.getFileUrl(e.fileInputId), this.value = e
					.file, this.body = {
						id: this.id,
						file: this.value,
						apiUrl: e.apiUrl,
						to: e.to,
						from: e.from || "",
						type: this.type,
						ext: e.ext || {},
						roomType: e.roomType || !1,
						chatType: e.chatType || "singleChat",
						onFileUploadError: e.onFileUploadError,
						onFileUploadComplete: e.onFileUploadComplete,
						success: e.success,
						fail: e.fail,
						flashUpload: e.flashUpload,
						width: e.width,
						height: e.height,
						body: e.body,
						uploadError: e.uploadError,
						uploadComplete: e.uploadComplete
					}
			}, (o.audio = function(e) {
				this.id = e, this.type = "audio", this.body = {}
			}).prototype.set = function(e) {
				e.file = e.file || o.prototype._utils.getFileUrl(e.fileInputId), this.value = e
					.file, this.filename = e.filename || this.value.filename, this.body = {
						id: this.id,
						file: this.value,
						filename: this.filename,
						apiUrl: e.apiUrl,
						to: e.to,
						from: e.from || "",
						type: this.type,
						ext: e.ext || {},
						length: e.length || 0,
						roomType: e.roomType || !1,
						chatType: e.chatType || "singleChat",
						file_length: e.file_length,
						onFileUploadError: e.onFileUploadError,
						onFileUploadComplete: e.onFileUploadComplete,
						success: e.success,
						fail: e.fail,
						flashUpload: e.flashUpload,
						body: e.body
					}
			}, (o.file = function(e) {
				this.id = e, this.type = "file", this.body = {}
			}).prototype.set = function(e) {
				e.file = e.file || o.prototype._utils.getFileUrl(e.fileInputId), this.value = e
					.file, this.filename = e.filename || this.value.filename, this.body = {
						id: this.id,
						file: this.value,
						filename: this.filename,
						apiUrl: e.apiUrl,
						to: e.to,
						from: e.from || "",
						type: this.type,
						ext: e.ext || {},
						roomType: e.roomType || !1,
						chatType: e.chatType || "singleChat",
						onFileUploadError: e.onFileUploadError,
						onFileUploadComplete: e.onFileUploadComplete,
						success: e.success,
						fail: e.fail,
						flashUpload: e.flashUpload,
						body: e.body
					}
			}, (o.video = function(e) {
				this.id = e, this.type = "video", this.body = {}
			}).prototype.set = function(e) {
				e.file = e.file || o.prototype._utils.getFileUrl(e.fileInputId), this.value = e
					.file, this.filename = e.filename || this.value.filename, this.body = {
						id: this.id,
						file: this.value,
						filename: this.filename,
						apiUrl: e.apiUrl,
						to: e.to,
						from: e.from || "",
						type: this.type,
						ext: e.ext || {},
						length: e.length || 0,
						roomType: e.roomType || !1,
						chatType: e.chatType || "singleChat",
						file_length: e.file_length,
						onFileUploadError: e.onFileUploadError,
						onFileUploadComplete: e.onFileUploadComplete,
						success: e.success,
						fail: e.fail,
						flashUpload: e.flashUpload,
						body: e.body
					}
			};
			var i = o;
			t.default = i
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i, n = o(r(4)),
				s = o(r(14)),
				a = (0, o(r(7)).default)(),
				u = s.default.getLogger("IM-SDK-LOG");

			function l(e) {
				if (e && "object" == (0, n.default)(e)) {
					var t = [],
						r = this.context.root.lookup("easemob.pb.KeyValue"),
						o = [];
					for (var i in e) {
						var s = r.decode(t);
						s.key = i, "object" == (0, n.default)(e[i]) ? (s.type = 8, s.stringValue = JSON
							.stringify(e[i])) : "string" == typeof e[i] ? (s.type = 7, s
							.stringValue = e[i]) : "boolean" == typeof e[i] ? (s.type = 1, s
							.varintValue = 1 == e[i] ? 1 : 0) : Number.isInteger(e[i]) ? (s.type =
							2, s.varintValue = e[i]) : (s.type = 6, s.doubleValue = e[i]), o.push(s)
					}
					return o
				}
			}
			var c = function(e, t) {
					var r = e.id;
					u.debug("⬆︎ messageOption: ", e);
					var o = [];
					if (t.context.root) {
						var i = t.context.root.lookup("easemob.pb.MessageBody.Content").decode(o),
							s = t.context.root.lookup("easemob.pb.KeyValue"),
							c = [],
							p = !e.group && !e.roomType && "chatRoom" != e.chatType && "chatroom" != e
							.chatType && "groupChat" != e.chatType && "groupchat" != e.chatType ||
							"singleChat" === e.chatType && !e.group,
							h = e.group && !e.roomType || "groupChat" === e.chatType || "groupchat" ===
							e.chatType,
							d = e.group && e.roomType || "chatRoom" === e.chatType || "chatroom" === e
							.chatType;
						switch (e.type) {
							case "txt":
								i.type = 0, i.text = e.msg;
								break;
							case "img":
								i.type = 1, i.displayName = e.body.filename, i.remotePath = e.body.url,
									i.secretKey = e.body.secret, i.fileLength = e.body.file_length, i
									.size = e.body.size, i.thumbnailDisplayName = e.body.filename;
								break;
							case "video":
								i.type = 2, i.displayName = e.body.filename, i.remotePath = e.body.url,
									i.secretKey = e.body.secret, i.fileLength = e.body.file_length, i
									.duration = e.body.length, i.thumbnailDisplayName = e.body.filename;
								break;
							case "loc":
								i.type = 3, i.latitude = e.lat, i.longitude = e.lng, i.address = e.addr,
									i.latitude = e.lat;
								break;
							case "audio":
								i.type = 4, i.displayName = e.body.filename, i.remotePath = e.body.url,
									i.secretKey = e.body.secret, i.fileLength = e.body.file_length, i
									.duration = e.body.length, i.thumbnailDisplayName = e.body.filename;
								break;
							case "file":
								i.type = 5, i.displayName = e.body.filename, i.remotePath = e.body.url,
									i.secretKey = e.body.secret, i.fileLength = e.body.file_length, i
									.size = e.body.size, i.thumbnailDisplayName = e.body.filename;
								break;
							case "cmd":
								i.type = 6, i.action = e.action;
								break;
							case "custom":
								i.type = 7, i.customEvent = e.customEvent, i.customExts = l.call(t, e
									.customExts)
						}
						if (e.ext)
							for (var f in e.ext) {
								var y = s.decode(o);
								y.key = f, "object" == (0, n.default)(e.ext[f]) ? (y.type = 8, y
										.stringValue = JSON.stringify(e.ext[f])) : "string" == typeof e
									.ext[f] ? (y.type = 7, y.stringValue = e.ext[f]) : "boolean" ==
									typeof e.ext[f] ? (y.type = 1, y.varintValue = 1 == e.ext[f] ? 1 :
										0) : Number.isInteger(e.ext[f]) ? (y.type = 2, y.varintValue = e
										.ext[f]) : (y.type = 6, y.doubleValue = e.ext[f]), c.push(y)
							}
						var m = t.context.root.lookup("easemob.pb.MessageBody"),
							g = m.decode(o);
						"channel" === e.type ? (g.type = 7, g.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}) : "recall" === e.type ? (g.type = 6, g.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}, g.ackMessageId = e.ackId) : "delivery" === e.type ? (g.type = 5, g
						.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}, g.ackMessageId = e.ackId) : "read" === e.type ? (g.type = 4, g.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}, g.ackMessageId = e.ackId, e.msgConfig && h && (g.msgConfig = e
							.msgConfig, g.ackContent = e.ackContent)) : p ? (g.type = 1, g.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}) : h ? (g.type = 2, g.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}, e.msgConfig && (g.msgConfig = e.msgConfig)) : d && (g.type = 3, g
						.from = {
							name: t.context.jid.name
						}, g.to = {
							name: e.to
						}), g.contents = [i], g.ext = c, g = m.encode(g).finish();
						var v = t.context.root.lookup("easemob.pb.Meta").decode(o);
						if (v.id = e.id, "recall" === e.type) {
							v.from = t.context.jid;
							var _ = "easemob.com";
							(h || d) && (_ = "conference.easemob.com"), v.to = {
								appKey: t.appKey,
								name: e.to,
								domain: _
							}
						} else if ("delivery" === e.type) v.from = t.context.jid, v.to = {
							appKey: t.appKey,
							name: e.to,
							domain: "easemob.com"
						};
						else if ("read" === e.type) {
							v.from = t.context.jid;
							_ = "easemob.com";
							h && (_ = "conference.easemob.com"), v.to = {
								appKey: t.appKey,
								name: e.to,
								domain: _
							}
						} else if ("channel" === e.type) {
							v.from = t.context.jid;
							_ = "easemob.com";
							h && (_ = "conference.easemob.com"), v.to = {
								appKey: t.appKey,
								name: e.to,
								domain: _
							}
						} else p ? (v.from = t.context.jid, v.to = {
							appKey: t.appKey,
							name: e.to,
							domain: "easemob.com"
						}) : (h || d) && (v.from = {
							appKey: t.appKey,
							name: t.user,
							domain: "conference.easemob.com"
						}, v.to = {
							appKey: t.appKey,
							name: e.to,
							domain: "conference.easemob.com"
						});
						v.ns = 1, v.payload = g, u.debug("⬆︎ thirdMessage: ", v);
						var N = t.context.root.lookup("easemob.pb.CommSyncUL"),
							E = N.decode(o);
						E.meta = v, E = N.encode(E).finish();
						var O = t.context.root.lookup("easemob.pb.MSync"),
							b = O.decode(o);
						b.version = t.version, b.encryptType = t.encryptType, b.command = 0, b.guid = t
							.context.jid, b.payload = E, u.debug("⬆︎ MSync: ", b), b = O.encode(b)
							.finish(), t.sendMSync(b, r)
					} else e.fail && e.fail({
						type: a.WEBIM_CONNCTION_CLIENT_OFFLINE,
						message: "Not logged in"
					})
				},
				p = function(e, t, r) {
					i = r;
					var o = t || this;
					if (o.msg = e, !e.file) return c(o.msg, t);
					if (o.msg.body && o.msg.body.url) return c(o.msg, t);
					var n = o.msg.onFileUploadComplete;
					o.msg.onFileUploadComplete = function(e) {
						if (e.entities[0]["file-metadata"]) {
							var r = e.entities[0]["file-metadata"]["content-length"];
							o.msg.filetype = e.entities[0]["file-metadata"]["content-type"], r >
								204800 && (o.msg.thumbnail = !0)
						}
						o.msg.body = {
							type: o.msg.type || "file",
							url: (t.isHttpDNS ? t.apiUrl + e.uri.substr(e.uri.indexOf("/", 9)) :
								e.uri) + "/" + e.entities[0].uuid,
							secret: e.entities[0]["share-secret"],
							filename: o.msg.file.filename || o.msg.filename,
							size: {
								width: o.msg.width || 0,
								height: o.msg.height || 0
							},
							length: o.msg.length || 0,
							file_length: o.msg.ext.file_length || 0,
							filetype: o.msg.filetype || o.msg.file.filetype
						}, c(o.msg, t), n instanceof Function && n(e, o.msg.id)
					}, i.uploadFile.call(t, o.msg)
				};
			t.default = p
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i = o(r(8)),
				n = (o(r(31)), o(r(7))),
				s = (o(r(30)), o(r(59))),
				a = o(r(14)).default.getLogger("IM-SDK-LOG"),
				u = (0, n.default)(),
				l = {
					0: "TEXT",
					1: "IMAGE",
					2: "VIDEO",
					3: "LOCATION",
					4: "VOICE",
					5: "FILE",
					6: "COMMAND",
					7: "CUSTOM"
				},
				c = function(e) {
					if (e) {
						for (var t = e, r = {}, o = 0; o < t.length; o++)
							if (8 == t[o].type) r[t[o].key] = JSON.parse(t[o].stringValue);
							else if (7 == t[o].type) r[t[o].key] = t[o].stringValue;
						else if (6 == t[o].type) r[t[o].key] = t[o].doubleValue;
						else if (5 == t[o].type) r[t[o].key] = t[o].floatValue;
						else if (1 == t[o].type) {
							var n = t[o].varintValue,
								s = new i.default(n.low, n.high, n.unsigned).toString();
							r[t[o].key] = 0 !== Number(s)
						} else if (2 == t[o].type || 3 == t[o].type || 4 == t[o].type) {
							n = t[o].varintValue, s = new i.default(n.low, n.high, n.unsigned)
							.toString();
							r[t[o].key] = Number(s)
						}
						return r
					}
				},
				p = function(e, t, r, o) {
					var n = r,
						p = new i.default(e.timestamp.low, e.timestamp.high, e.timestamp.unsigned)
						.toString(),
						h = n.context.root.lookup("easemob.pb.MessageBody").decode(e.payload),
						d = new i.default(e.id.low, e.id.high, e.id.unsigned).toString(),
						f = h.ackMessageId ? new i.default(h.ackMessageId.low, h.ackMessageId.high, h
							.ackMessageId.unsigned).toString() : "",
						y = null,
						m = h.from && h.from.name,
						g = h.to && h.to.name;
					if (a.debug("⬇thirdMessage：", h), 1 === h.type) y = "chat";
					else if (2 === h.type) y = "groupchat";
					else if (3 === h.type) y = "chatroom";
					else {
						if (4 === h.type) return y = "read_ack", h.msgConfig ? void r.onReadMessage({
							mid: f,
							groupReadCount: h.ext[0] && JSON.parse(h.ext[0].stringValue),
							ackContent: h.ackContent
						}) : void r.onReadMessage({
							mid: f
						});
						if (5 === h.type) return y = "deliver_ack", void r.onDeliverdMessage({
							from: m,
							to: g,
							mid: f
						});
						if (6 === h.type) return y = "recall", void r.onRecallMessage({
							from: m,
							to: g,
							mid: f
						});
						if (7 === h.type) return void r.onChannelMessage({
							from: m,
							to: g
						})
					}
					for (var v = 0; v < h.contents.length; v++) {
						var _ = {},
							N = t.errorCode > 0,
							E = t.errorCode,
							O = t.reason,
							b = h.contents[v],
							T = {};
						h.ext && (T = c(h.ext));
						try {
							switch (b.type) {
								case 0:
									var I = h.contents[v].text;
									if (!C) var C = {};
									var R = s.default.parseTextMessage(I, C && C.Emoji);
									R.isemoji ? (!(_ = {
											id: d,
											type: y,
											contentsType: "EMOJI",
											from: m,
											to: g,
											data: R.body,
											ext: T,
											time: p,
											msgConfig: h.msgConfig
										}).delay && delete _.delay, !_.msgConfig && delete h
										.msgConfig, _.error = N, _.errorText = O, _.errorCode = E, !
										o && n.onEmojiMessage(_)) : (!(_ = {
											id: d,
											type: y,
											contentsType: l[b.type],
											from: m,
											to: g,
											data: b.text,
											ext: T,
											sourceMsg: b.text,
											time: p,
											msgConfig: h.msgConfig
										}).msgConfig && delete h.msgConfig, _.error = N, _
										.errorText = O, _.errorCode = E, !o && r.onTextMessage(_));
									break;
								case 1:
									if (b.size) var S = b.size.width || 0,
										w = b.size.height || 0;
									var A = r.useOwnUploadFun ? b.remotePath : (b.remotePath && n
											.apiUrl + b.remotePath.substr(b.remotePath.indexOf("/", 9))
											) + "?em-redirect=true";
									!(_ = {
										id: d,
										type: y,
										contentsType: l[b.type],
										from: m,
										to: g,
										url: A,
										secret: b.secretKey,
										filename: b.displayName,
										thumb: b.thumbnailRemotePath,
										thumb_secret: b.thumbnailSecretKey,
										file_length: b.fileLength || "",
										width: S,
										height: w,
										filetype: b.filetype || "",
										accessToken: r.token || "",
										ext: T,
										time: p,
										msgConfig: h.msgConfig
									}).delay && delete _.delay, !_.msgConfig && delete h.msgConfig, _
										.error = N, _.errorText = O, _.errorCode = E, !o && r
										.onPictureMessage(_);
									break;
								case 2:
									A = r.useOwnUploadFun ? b.remotePath : (b.remotePath && n.apiUrl + b
											.remotePath.substr(b.remotePath.indexOf("/", 9))) +
										"?em-redirect=true";
									!(_ = {
										id: d,
										type: y,
										contentsType: l[b.type],
										from: m,
										to: g,
										url: A,
										secret: b.secretKey,
										filename: b.displayName,
										length: b.duration || "",
										file_length: b.fileLength || "",
										filetype: b.filetype || "",
										accessToken: r.token || "",
										ext: T,
										time: p,
										msgConfig: h.msgConfig
									}).delay && delete _.delay, !_.msgConfig && delete h.msgConfig, _
										.error = N, _.errorText = O, _.errorCode = E, !o && r
										.onVideoMessage(_);
									break;
								case 3:
									!(_ = {
										id: d,
										type: y,
										contentsType: l[b.type],
										from: m,
										to: g,
										addr: b.address,
										lat: b.latitude,
										lng: b.longitude,
										ext: T,
										time: p,
										msgConfig: h.msgConfig
									}).delay && delete _.delay, !_.msgConfig && delete h.msgConfig, _
										.error = N, _.errorText = O, _.errorCode = E, !o && r
										.onLocationMessage(_);
									break;
								case 4:
									A = r.useOwnUploadFun ? b.remotePath : (b.remotePath && n.apiUrl + b
											.remotePath.substr(b.remotePath.indexOf("/", 9))) +
										"?em-redirect=true";
									!(_ = {
										id: d,
										type: y,
										contentsType: l[b.type],
										from: m,
										to: g,
										url: A,
										secret: b.secretKey,
										filename: b.displayName,
										file_length: b.fileLength || "",
										accessToken: r.token || "",
										ext: T,
										length: b.duration,
										time: p,
										msgConfig: h.msgConfig
									}).delay && delete _.delay, !_.msgConfig && delete h.msgConfig, _
										.error = N, _.errorText = O, _.errorCode = E, !o && r
										.onAudioMessage(_);
									break;
								case 5:
									A = r.useOwnUploadFun ? b.remotePath : (b.remotePath && n.apiUrl + b
											.remotePath.substr(b.remotePath.indexOf("/", 9))) +
										"?em-redirect=true";
									!(_ = {
										id: d,
										type: y,
										contentsType: l[b.type],
										from: m,
										to: g,
										url: A,
										secret: b.secretKey,
										filename: b.displayName,
										file_length: b.fileLength,
										accessToken: r.token || "",
										ext: T,
										time: p,
										msgConfig: h.msgConfig
									}).delay && delete _.delay, !_.msgConfig && delete h.msgConfig, _
										.error = N, _.errorText = O, _.errorCode = E, !o && r
										.onFileMessage(_);
									break;
								case 6:
									!(_ = {
										id: d,
										type: y,
										contentsType: l[b.type],
										from: m,
										to: g,
										action: b.action,
										ext: T,
										time: p,
										msgConfig: h.msgConfig
									}).msgConfig && delete h.msgConfig, _.error = N, _.errorText = O, _
										.errorCode = E, !o && r.onCmdMessage(_);
									break;
								case 7:
									var k = "",
										x = "";
									h.contents[0].customExts && (k = c(h.contents[0].customExts)), h
										.contents[0].params && (x = c(h.contents[0].params)), _ = {
											id: d,
											type: y,
											contentsType: l[b.type],
											from: m,
											to: g,
											customEvent: b.customEvent,
											params: x,
											customExts: k,
											ext: T,
											time: p
										}, !o && r.onCustomMessage(_)
							}
						} catch (e) {
							r.onError({
								type: u.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
								message: "parsing message error",
								data: e
							})
						}
						if (o || r.delivery) return _.message_type = y, _
					}
				};
			t.default = p
		}, function(e, t, r) {
			"use strict";
			e.exports = c;
			var o, i, n, s, a, u = r(23);

			function l(e, t) {
				if (e && e.length) {
					for (var r = {}, o = 0; o < e.length; ++o) r[e[o].name] = e[o].toJSON(t);
					return r
				}
			}

			function c(e, t) {
				u.call(this, e, t), this.nested = void 0, this._nestedArray = null
			}

			function p(e) {
				return e._nestedArray = null, e
			}((c.prototype = Object.create(u.prototype)).constructor = c).className = "Namespace", c
				.fromJSON = function(e, t) {
					return new c(e, t.options).addJSON(t.nested)
				}, c.arrayToJSON = l, c.isReservedId = function(e, t) {
					if (e)
						for (var r = 0; r < e.length; ++r)
							if ("string" != typeof e[r] && e[r][0] <= t && e[r][1] >= t) return !0;
					return !1
				}, c.isReservedName = function(e, t) {
					if (e)
						for (var r = 0; r < e.length; ++r)
							if (e[r] === t) return !0;
					return !1
				}, Object.defineProperty(c.prototype, "nestedArray", {
					get: function() {
						return this._nestedArray || (this._nestedArray = n.toArray(this.nested))
					}
				}), c.prototype.toJSON = function(e) {
					return n.toObject(["options", this.options, "nested", l(this.nestedArray, e)])
				}, c.prototype.addJSON = function(e) {
					if (e)
						for (var t, r = Object.keys(e), n = 0; n < r.length; ++n) t = e[r[n]], this.add(
							(void 0 !== t.fields ? s.fromJSON : void 0 !== t.values ? o.fromJSON :
								void 0 !== t.methods ? a.fromJSON : void 0 !== t.id ? i.fromJSON : c
								.fromJSON)(r[n], t));
					return this
				}, c.prototype.get = function(e) {
					return this.nested && this.nested[e] || null
				}, c.prototype.getEnum = function(e) {
					if (this.nested && this.nested[e] instanceof o) return this.nested[e].values;
					throw Error("no such enum: " + e)
				}, c.prototype.add = function(e) {
					if (!(e instanceof i && void 0 !== e.extend || e instanceof s || e instanceof o ||
							e instanceof a || e instanceof c)) throw TypeError(
						"object must be a valid nested object");
					if (this.nested) {
						var t = this.get(e.name);
						if (t) {
							if (!(t instanceof c && e instanceof c) || t instanceof s || t instanceof a)
								throw Error("duplicate name '" + e.name + "' in " + this);
							for (var r = t.nestedArray, n = 0; n < r.length; ++n) e.add(r[n]);
							this.remove(t), this.nested || (this.nested = {}), e.setOptions(t.options, !
								0)
						}
					} else this.nested = {};
					return this.nested[e.name] = e, e.onAdd(this), p(this)
				}, c.prototype.remove = function(e) {
					if (!(e instanceof u)) throw TypeError("object must be a ReflectionObject");
					if (e.parent !== this) throw Error(e + " is not a member of " + this);
					return delete this.nested[e.name], Object.keys(this.nested).length || (this.nested =
						void 0), e.onRemove(this), p(this)
				}, c.prototype.define = function(e, t) {
					if (n.isString(e)) e = e.split(".");
					else if (!Array.isArray(e)) throw TypeError("illegal path");
					if (e && e.length && "" === e[0]) throw Error("path must be relative");
					for (var r = this; e.length > 0;) {
						var o = e.shift();
						if (r.nested && r.nested[o]) {
							if (!((r = r.nested[o]) instanceof c)) throw Error(
								"path conflicts with non-namespace objects")
						} else r.add(r = new c(o))
					}
					return t && r.addJSON(t), r
				}, c.prototype.resolveAll = function() {
					for (var e = this.nestedArray, t = 0; t < e.length;) e[t] instanceof c ? e[t++]
						.resolveAll() : e[t++].resolve();
					return this.resolve()
				}, c.prototype.lookup = function(e, t, r) {
					if ("boolean" == typeof t ? (r = t, t = void 0) : t && !Array.isArray(t) && (t = [
							t]), n.isString(e) && e.length) {
						if ("." === e) return this.root;
						e = e.split(".")
					} else if (!e.length) return this;
					if ("" === e[0]) return this.root.lookup(e.slice(1), t);
					var o = this.get(e[0]);
					if (o) {
						if (1 === e.length) {
							if (!t || t.indexOf(o.constructor) > -1) return o
						} else if (o instanceof c && (o = o.lookup(e.slice(1), t, !0))) return o
					} else
						for (var i = 0; i < this.nestedArray.length; ++i)
							if (this._nestedArray[i] instanceof c && (o = this._nestedArray[i].lookup(e,
									t, !0))) return o;
					return null === this.parent || r ? null : this.parent.lookup(e, t)
				}, c.prototype.lookupType = function(e) {
					var t = this.lookup(e, [s]);
					if (!t) throw Error("no such type: " + e);
					return t
				}, c.prototype.lookupEnum = function(e) {
					var t = this.lookup(e, [o]);
					if (!t) throw Error("no such Enum '" + e + "' in " + this);
					return t
				}, c.prototype.lookupTypeOrEnum = function(e) {
					var t = this.lookup(e, [s, o]);
					if (!t) throw Error("no such Type or Enum '" + e + "' in " + this);
					return t
				}, c.prototype.lookupService = function(e) {
					var t = this.lookup(e, [a]);
					if (!t) throw Error("no such Service '" + e + "' in " + this);
					return t
				}, c._configure = function() {
					o = r(10), i = r(16), n = r(3), s = r(22), a = r(41)
				}
		}, function(e, t, r) {
			"use strict";
			e.exports = s;
			var o, i, n = r(23);

			function s(e, t, r, o) {
				if (Array.isArray(t) || (r = t, t = void 0), n.call(this, e, r), void 0 !== t && !Array
					.isArray(t)) throw TypeError("fieldNames must be an Array");
				this.oneof = t || [], this.fieldsArray = [], this.comment = o
			}

			function a(e) {
				if (e.parent)
					for (var t = 0; t < e.fieldsArray.length; ++t) e.fieldsArray[t].parent || e.parent
						.add(e.fieldsArray[t])
			}((s.prototype = Object.create(n.prototype)).constructor = s).className = "OneOf", s
				.fromJSON = function(e, t) {
					return new s(e, t.oneof, t.options, t.comment)
				}, s.prototype.toJSON = function(e) {
					var t = !!e && Boolean(e.keepComments);
					return i.toObject(["options", this.options, "oneof", this.oneof, "comment", t ? this
						.comment : void 0
					])
				}, s.prototype.add = function(e) {
					if (!(e instanceof o)) throw TypeError("field must be a Field");
					return e.parent && e.parent !== this.parent && e.parent.remove(e), this.oneof.push(e
						.name), this.fieldsArray.push(e), e.partOf = this, a(this), this
				}, s.prototype.remove = function(e) {
					if (!(e instanceof o)) throw TypeError("field must be a Field");
					var t = this.fieldsArray.indexOf(e);
					if (t < 0) throw Error(e + " is not a member of " + this);
					return this.fieldsArray.splice(t, 1), (t = this.oneof.indexOf(e.name)) > -1 && this
						.oneof.splice(t, 1), e.partOf = null, this
				}, s.prototype.onAdd = function(e) {
					n.prototype.onAdd.call(this, e);
					for (var t = 0; t < this.oneof.length; ++t) {
						var r = e.get(this.oneof[t]);
						r && !r.partOf && (r.partOf = this, this.fieldsArray.push(r))
					}
					a(this)
				}, s.prototype.onRemove = function(e) {
					for (var t, r = 0; r < this.fieldsArray.length; ++r)(t = this.fieldsArray[r])
						.parent && t.parent.remove(t);
					n.prototype.onRemove.call(this, e)
				}, s.d = function() {
					for (var e = new Array(arguments.length), t = 0; t < arguments.length;) e[t] =
						arguments[t++];
					return function(t, r) {
						i.decorateType(t.constructor).add(new s(r, e)), Object.defineProperty(t,
						r, {
							get: i.oneOfGetter(e),
							set: i.oneOfSetter(e)
						})
					}
				}, s._configure = function() {
					o = r(16), i = r(3)
				}
		}, , , , function(e, t, r) {
			"use strict";
			e.exports = function(e, t) {
				if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
			}
		}, function(e, t, r) {
			"use strict";
			var o = e.exports;
			o.length = function(e) {
				for (var t = 0, r = 0, o = 0; o < e.length; ++o)(r = e.charCodeAt(o)) < 128 ? t +=
					1 : r < 2048 ? t += 2 : 55296 == (64512 & r) && 56320 == (64512 & e.charCodeAt(
						o + 1)) ? (++o, t += 4) : t += 3;
				return t
			}, o.read = function(e, t, r) {
				if (r - t < 1) return "";
				for (var o, i = null, n = [], s = 0; t < r;)(o = e[t++]) < 128 ? n[s++] = o : o >
					191 && o < 224 ? n[s++] = (31 & o) << 6 | 63 & e[t++] : o > 239 && o < 365 ? (
						o = ((7 & o) << 18 | (63 & e[t++]) << 12 | (63 & e[t++]) << 6 | 63 & e[
						t++]) - 65536, n[s++] = 55296 + (o >> 10), n[s++] = 56320 + (1023 & o)) : n[
						s++] = (15 & o) << 12 | (63 & e[t++]) << 6 | 63 & e[t++], s > 8191 && ((i ||
						(i = [])).push(String.fromCharCode.apply(String, n)), s = 0);
				return i ? (s && i.push(String.fromCharCode.apply(String, n.slice(0, s))), i.join(
					"")) : String.fromCharCode.apply(String, n.slice(0, s))
			}, o.write = function(e, t, r) {
				for (var o, i, n = r, s = 0; s < e.length; ++s)(o = e.charCodeAt(s)) < 128 ? t[
					r++] = o : o < 2048 ? (t[r++] = o >> 6 | 192, t[r++] = 63 & o | 128) : 55296 ==
					(64512 & o) && 56320 == (64512 & (i = e.charCodeAt(s + 1))) ? (o = 65536 + ((
							1023 & o) << 10) + (1023 & i), ++s, t[r++] = o >> 18 | 240, t[r++] =
						o >> 12 & 63 | 128, t[r++] = o >> 6 & 63 | 128, t[r++] = 63 & o | 128) : (t[
						r++] = o >> 12 | 224, t[r++] = o >> 6 & 63 | 128, t[r++] = 63 & o | 128);
				return r - n
			}
		}, function(e, t, r) {
			"use strict";
			var o = r(0)(r(4));
			e.exports = h;
			var i = r(33);
			((h.prototype = Object.create(i.prototype)).constructor = h).className = "Root";
			var n, s, a, u = r(16),
				l = r(10),
				c = r(34),
				p = r(3);

			function h(e) {
				i.call(this, "", e), this.deferred = [], this.files = [], this.names = []
			}

			function d() {}
			h.fromJSON = function(e, t) {
				return e = "string" == typeof e ? JSON.parse(e) : e, t || (t = new h), e.options &&
					t.setOptions(e.options), t.addJSON(e.nested)
			}, h.prototype.resolvePath = p.path.resolve, h.prototype.parseFromPbString = function e(
				t, r, i) {
				"function" == typeof r && (i = r, r = void 0);
				var n = this;
				if (!i) return p.asPromise(e, n, t, r);
				var u = null;
				if ("string" == typeof t) u = JSON.parse(t);
				else {
					if ("object" !== (0, o.default)(t)) return void console.log("pb格式转化失败");
					u = t
				}

				function l(e, t) {
					if (i) {
						var r = i;
						i = null, r(e, t)
					}
				}

				function c(e, t) {
					try {
						if (p.isString(t) && "{" === t.charAt(0) && (t = JSON.parse(t)), p.isString(
								t)) {
							s.filename = e;
							var o, i = s(t, n, r),
								a = 0;
							if (i.imports)
								for (; a < i.imports.length; ++a) h(o = i.imports[a]);
							if (i.weakImports) {
								for (a = 0; a < i.weakImports.length; ++a) o = i.weakImports[a];
								h(o)
							}
						} else n.setOptions(t.options).addJSON(t.nested)
					} catch (e) {
						l(e)
					}
					l(null, n)
				}

				function h(e) {
					n.names.indexOf(e) > -1 || (n.names.push(e), e in a && c(e, a[e]))
				}
				c(u.name, u.pbJsonStr)
			}, h.prototype.load = function e(t, r, o) {
				"function" == typeof r && (o = r, r = void 0);
				var i = this;
				if (!o) return p.asPromise(e, i, t, r);
				var n = o === d;

				function u(e, t) {
					if (o) {
						var r = o;
						if (o = null, n) throw e;
						r(e, t)
					}
				}

				function l(e, t) {
					try {
						if (p.isString(t) && "{" === t.charAt(0) && (t = JSON.parse(t)), p.isString(
								t)) {
							s.filename = e;
							var o, a = s(t, i, r),
								l = 0;
							if (a.imports)
								for (; l < a.imports.length; ++l)(o = i.resolvePath(e, a.imports[
									l])) && c(o);
							if (a.weakImports)
								for (l = 0; l < a.weakImports.length; ++l)(o = i.resolvePath(e, a
									.weakImports[l])) && c(o, !0)
						} else i.setOptions(t.options).addJSON(t.nested)
					} catch (e) {
						u(e)
					}
					n || h || u(null, i)
				}

				function c(e, t) {
					var r = e.lastIndexOf("google/protobuf/");
					if (r > -1) {
						var s = e.substring(r);
						s in a && (e = s)
					}
					if (!(i.files.indexOf(e) > -1))
						if (i.files.push(e), e in a) n ? l(e, a[e]) : (++h, setTimeout((function() {
							--h, l(e, a[e])
						})));
						else if (n) {
						var c;
						try {
							c = p.fs.readFileSync(e).toString("utf8")
						} catch (e) {
							return void(t || u(e))
						}
						l(e, c)
					} else ++h, p.fetch(e, (function(r, n) {
						--h, o && (r ? t ? h || u(null, i) : u(r) : l(e, n))
					}))
				}
				var h = 0;
				p.isString(t) && (t = [t]);
				for (var f, y = 0; y < t.length; ++y)(f = i.resolvePath("", t[y])) && c(f);
				if (n) return i;
				h || u(null, i)
			}, h.prototype.loadSync = function(e, t) {
				if (!p.isNode) throw Error("not supported");
				return this.load(e, t, d)
			}, h.prototype.resolveAll = function() {
				if (this.deferred.length) throw Error("unresolvable extensions: " + this.deferred
					.map((function(e) {
						return "'extend " + e.extend + "' in " + e.parent.fullName
					})).join(", "));
				return i.prototype.resolveAll.call(this)
			};
			var f = /^[A-Z]/;

			function y(e, t) {
				var r = t.parent.lookup(t.extend);
				if (r) {
					var o = new u(t.fullName, t.id, t.type, t.rule, void 0, t.options);
					return o.declaringField = t, t.extensionField = o, r.add(o), !0
				}
				return !1
			}
			h.prototype._handleAdd = function(e) {
				if (e instanceof u) void 0 === e.extend || e.extensionField || y(0, e) || this
					.deferred.push(e);
				else if (e instanceof l) f.test(e.name) && (e.parent[e.name] = e.values);
				else if (!(e instanceof c)) {
					if (e instanceof n)
						for (var t = 0; t < this.deferred.length;) y(0, this.deferred[t]) ? this
							.deferred.splice(t, 1) : ++t;
					for (var r = 0; r < e.nestedArray.length; ++r) this._handleAdd(e._nestedArray[
						r]);
					f.test(e.name) && (e.parent[e.name] = e)
				}
			}, h.prototype._handleRemove = function(e) {
				if (e instanceof u) {
					if (void 0 !== e.extend)
						if (e.extensionField) e.extensionField.parent.remove(e.extensionField), e
							.extensionField = null;
						else {
							var t = this.deferred.indexOf(e);
							t > -1 && this.deferred.splice(t, 1)
						}
				} else if (e instanceof l) f.test(e.name) && delete e.parent[e.name];
				else if (e instanceof i) {
					for (var r = 0; r < e.nestedArray.length; ++r) this._handleRemove(e
						._nestedArray[r]);
					f.test(e.name) && delete e.parent[e.name]
				}
			}, h._configure = function() {
				n = r(22), s = r(97), a = r(100), u = r(16), l = r(10), c = r(34), p = r(3)
			}
		}, function(e, t, r) {
			"use strict";
			e.exports = a;
			var o, i, n, s = r(33);

			function a(e, t) {
				s.call(this, e, t), this.methods = {}, this._methodsArray = null
			}

			function u(e) {
				return e._methodsArray = null, e
			}((a.prototype = Object.create(s.prototype)).constructor = a).className = "Service", a
				.fromJSON = function(e, t) {
					var r = new a(e, t.options);
					if (t.methods)
						for (var i = Object.keys(t.methods), n = 0; n < i.length; ++n) r.add(o.fromJSON(
							i[n], t.methods[i[n]]));
					return t.nested && r.addJSON(t.nested), r.comment = t.comment, r
				}, a.prototype.toJSON = function(e) {
					var t = s.prototype.toJSON.call(this, e),
						r = !!e && Boolean(e.keepComments);
					return i.toObject(["options", t && t.options || void 0, "methods", s.arrayToJSON(
							this.methodsArray, e) || {}, "nested", t && t.nested || void 0,
						"comment", r ? this.comment : void 0
					])
				}, Object.defineProperty(a.prototype, "methodsArray", {
					get: function() {
						return this._methodsArray || (this._methodsArray = i.toArray(this
							.methods))
					}
				}), a.prototype.get = function(e) {
					return this.methods[e] || s.prototype.get.call(this, e)
				}, a.prototype.resolveAll = function() {
					for (var e = this.methodsArray, t = 0; t < e.length; ++t) e[t].resolve();
					return s.prototype.resolve.call(this)
				}, a.prototype.add = function(e) {
					if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " + this);
					return e instanceof o ? (this.methods[e.name] = e, e.parent = this, u(this)) : s
						.prototype.add.call(this, e)
				}, a.prototype.remove = function(e) {
					if (e instanceof o) {
						if (this.methods[e.name] !== e) throw Error(e + " is not a member of " + this);
						return delete this.methods[e.name], e.parent = null, u(this)
					}
					return s.prototype.remove.call(this, e)
				}, a.prototype.create = function(e, t, r) {
					for (var o, s = new n.Service(e, t, r), a = 0; a < this.methodsArray.length; ++a) {
						var u = i.lcFirst((o = this._methodsArray[a]).resolve().name).replace(
							/[^$\w_]/g, "");
						s[u] = i.codegen(["r", "c"], i.isReserved(u) ? u + "_" : u)(
							"return this.rpcCall(m,q,s,r,c)")({
							m: o,
							q: o.resolvedRequestType.ctor,
							s: o.resolvedResponseType.ctor
						})
					}
					return s
				}, a._configure = function() {
					o = r(68), i = r(3), n = r(99)
				}
		}, , , , , , , , , , , , , function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i, n, s = o(r(55)),
				a = o(r(4)),
				u = o(r(7)),
				l = o(r(30)),
				c = o(r(56)),
				p = o(r(31)),
				h = o(r(32)),
				d = o(r(60)),
				f = o(r(61)),
				y = o(r(62)),
				m = o(r(8)),
				g = o(r(63)),
				v = o(r(14)).default.getLogger("IM-SDK-LOG"),
				_ = {},
				N = (0, u.default)(),
				E = 1,
				O = function() {},
				b = function e(t) {
					if (!this instanceof e) return new e(t);
					t = t || {};
					this.isDebug = t.isDebug || !1, this.isHttpDNS = t.isHttpDNS || !1, this
						.isMultiLoginSessions = t.isMultiLoginSessions || !1, this.wait = t.wait || 30,
						this.retry = t.retry || !1, this.https = t.https && window && "https:" ===
						location.protocol, this.url = t.url, this.hold = t.hold || 1, this.route = t
						.route || null, this.inactivity = t.inactivity || 30, this.heartBeatWait = t
						.heartBeatWait || 3e4, this.maxRetries = t.maxRetries || 5, this.isAutoLogin = !
						1 !== t.isAutoLogin, this.pollingTime = t.pollingTime || 800, this
						.stropheConn = !1, this.autoReconnectNumMax = t.autoReconnectNumMax || 0, this
						.autoReconnectNumTotal = 0, this.autoReconnectInterval = t
						.autoReconnectInterval || 0, this.context = {
							status: N.STATUS_INIT
						}, this.sendQueue = new c.default, this.intervalId = null, this.apiUrl = t
						.apiUrl || "", this.encrypt = t.encrypt || {
							encrypt: {
								type: "none"
							}
						}, this.delivery = t.delivery || !1, this.appKey = t.appKey || "", this.domain =
						t.domain || "easemob.com", this.clientResource = "84ff3eba1", this.user = "",
						this.orgName = "", this.appName = "", this.token = "", this.unSendMsgArr = [],
						this.dnsArr = ["https://rs.easemob.com", "http://182.92.174.78",
							"http://112.126.66.111"
						], this.dnsIndex = 0, this.dnsTotal = this.dnsArr.length, this.restHosts = [],
						this.restIndex = 0, this.restTotal = 0, this.socketHost = [], this.hostIndex =
						0, this.hostTotal = 0, this.groupOption = {}, this.version = t.version ||
						"3.0.0", this.compressAlgorimth = t.compressAlgorimth || 0, this.userAgent = t
						.userAgent || 0, this.pov = t.pov || 0, this.command = t.command || 3, this
						.deviceId = t.deviceId || "webim", this.encryptKey = t.encryptKey || "", this
						.firstPayload = t.firstPayload || [], this.compressType = t.compressType || [0],
						this.encryptType = t.encryptType || [0], this.osType = 16, this
						.useOwnUploadFun = t.useOwnUploadFun || !1, this.openSessionList = t
						.openSessionList || !0, this._load_msg_cache = []
				};
			b.prototype.registerUser = function(e) {
					this.isHttpDNS ? (this.dnsIndex = 0, this.getHttpDNS(e, "signup")) : this.signup(e)
				}, b.prototype.listen = function(e) {
					this.onOpened = e.onOpened || O, this.onClosed = e.onClosed || O, this
						.onTextMessage = e.onTextMessage || O, this.onEmojiMessage = e.onEmojiMessage ||
						O, this.onPictureMessage = e.onPictureMessage || O, this.onAudioMessage = e
						.onAudioMessage || O, this.onVideoMessage = e.onVideoMessage || O, this
						.onFileMessage = e.onFileMessage || O, this.onLocationMessage = e
						.onLocationMessage || O, this.onCustomMessage = e.onCustomMessage || O, this
						.onCmdMessage = e.onCmdMessage || O, this.onStatisticMessage = e
						.onStatisticMessage || O, this.onPresence = e.onPresence || O, this.onRoster = e
						.onRoster || O, this.onError = e.onError || O, this.onReceivedMessage = e
						.onReceivedMessage || O, this.onInviteMessage = e.onInviteMessage || O, this
						.onDeliverdMessage = e.onDeliveredMessage || O, this.onReadMessage = e
						.onReadMessage || O, this.onRecallMessage = e.onRecallMessage || O, this
						.onChannelMessage = e.onChannelMessage || O, this.onMutedMessage = e
						.onMutedMessage || O, this.onOffline = e.onOffline || O, this.onOnline = e
						.onOnline || O, this.onConfirmPop = e.onConfirmPop || O, this.onCreateGroup = e
						.onCreateGroup || O, this.onContactAgreed = e.onContactAgreed || O, this
						.onContactRefuse = e.onContactRefuse || O, this.onContactInvited = e
						.onContactInvited || O, this.onContactDeleted = e.onContactDeleted || O, this
						.onContactAdded = e.onContactAdded || O, this.onUpdateMyGroupList = e
						.onUpdateMyGroupList || O, this.onUpdateMyRoster = e.onUpdateMyRoster || O, this
						.onBlacklistUpdate = e.onBlacklistUpdate || O, n._listenNetwork(this.onOnline,
							this.onOffline)
				}, b.prototype.getParams = function(e) {
					i = e.root, n = e.utils, b.prototype._utils = n, _.utils = n, _.statusCode = N, _
						.message = l.default, _.message.prototype._utils = n
				}, b.prototype._msgHash = {}, b.prototype._queues = [], b.prototype._lastsession =
				function(e, t, r) {
					var o = [],
						n = i.lookup("easemob.pb.CommSyncUL"),
						s = n.decode(o);
					s.queue = t, s.key = new m.default(e.low, e.high, e.unsigned).toString(), s = n
						.encode(s).finish(), v.debug("⬆︎_lastsession: ", s);
					var a = i.lookup("easemob.pb.MSync"),
						u = a.decode(o);
					if (u.version = r.version, u.encryptType = r.encryptType, u.command = 0, u.payload =
						s, u = a.encode(u).finish(), r.sock.readyState !== E) {
						var l = {
							type: N.WEBIM_CONNCTION_DISCONNECTED,
							message: "websocket has been disconnected"
						};
						r.onError(l)
					} else r._base64transform(u, r)
				};
			b.prototype._metapayload = function(e, t, r) {
				for (var o = 0; o < e.length; o++) {
					var i = new m.default(e[o].id.low, e[o].id.high, e[o].id.unsigned).toString();
					if (!this._load_msg_cache.some((function(e) {
							if (e.msgId == i) return !0
						}))) {
						v.debug("下行meta：", e[o]), 1 === e[o].ns ? (0, h.default)(e[o], t, r) : 2 ===
							e[o].ns ? (0, d.default)(e[o], t, r) : 3 === e[o].ns ? f.default
							.handleMessage(e[o], t, r) : 0 === e[o].ns ? (0, y.default)(e[o], t,
							r) : 4 === e[o].ns && r.registerConfrIQHandler && r
							.registerConfrIQHandler(e[o], t, r);
						var n = e[o].from.name,
							s = e[o].to.name,
							a = -1 != e[o].to.domain.indexOf("conference");
						this._load_msg_cache.length <= 100 || this._load_msg_cache.shift(), this
							._load_msg_cache.push({
								msgId: i,
								from: n,
								to: s,
								isGroup: a
							})
					}
				}
			}, b.prototype._rebuild = function() {
				var e = [],
					t = i.lookup("easemob.pb.StatisticsBody"),
					r = t.decode(e);
				r.operation = 0, r = t.encode(r).finish();
				var o = i.lookup("easemob.pb.Meta").decode(e);
				o.id = (new Date).valueOf(), o.ns = 0, o.payload = r;
				var n = i.lookup("easemob.pb.CommSyncUL"),
					s = n.decode(e);
				s.meta = o, v.debug("⬆︎ rebuild: ", o), s = n.encode(s).finish();
				var a = i.lookup("easemob.pb.MSync"),
					u = a.decode(e);
				u.version = this.version, u.encryptType = [0], u.command = 0, u.payload = s, u = a
					.encode(u).finish(), this._base64transform(u, this)
			}, b.prototype._backqueue = function(e, t) {
				var r = [],
					o = i.lookup("easemob.pb.CommSyncUL"),
					n = o.decode(r);
				n.queue = e, v.debug("⬆︎queue: ", n), n = o.encode(n).finish();
				var s = i.lookup("easemob.pb.MSync"),
					a = s.decode(r);
				a.version = t.version, a.encryptType = t.encryptType, a.command = 0, a.payload = n,
					a = s.encode(a).finish(), t._base64transform(a, t)
			};
			var T = function(e) {
				var t = i.lookup("easemob.pb.MSync"),
					r = t.decode([]);
				r.version = e.version, r.encryptType = e.encryptType, r.command = 1, v.debug(
					"⬆︎unreadDeal: ", r), r = t.encode(r).finish(), e._base64transform(r, e)
			};
			b.prototype._receiveProvision = function(e, t) {
					var r = i.lookup("easemob.pb.Provision").decode(e.payload);
					t.context.jid && (t.context.jid.clientResource = r.resource), t.clientResource = r
						.resource, 0 == r.status.errorCode ? (t.onOpened(), "object" == ("undefined" ==
								typeof window ? "undefined" : (0, a.default)(window)) && window
							.document && window.navigator || t.heartBeat(t), T(t), t._rebuild(t)) : t
						.isDebug && console.log("下行provision失败: ", r)
				}, b.prototype.heartBeatID = 0, b.prototype.heartBeat = function(e) {
					this.stopHeartBeat(), this.heartBeatID = setInterval((function() {
						T(e)
					}), this.heartBeatWait)
				}, b.prototype.stopHeartBeat = function() {
					clearInterval(this.heartBeatID)
				}, b.prototype.getRestFromHttpDNS = function(e, t) {
					if (!(this.restIndex > this.restTotal)) {
						var r = "",
							o = this.restHosts[this.restIndex],
							i = o.domain,
							n = o.ip;
						if (n && "http:" == location.protocol) {
							var s = o.port;
							r = ("https:" === location.protocol ? "https:" : "http:") + "//" + n + ":" +
								s
						} else r = ("https:" === location.protocol ? "https:" : "http:") + "//" + i;
						"" != r && (this.apiUrl = r, e.apiUrl = r), "login" == t ? this.login(e) : this
							.signup(e)
					}
				}, b.prototype.getHttpDNS = function(e, t) {
					var r = this,
						o = {
							url: this.dnsArr[this.dnsIndex] + "/easemob/server.json",
							dataType: "json",
							type: "GET",
							data: {
								app_key: encodeURIComponent(e.appKey || this.appKey)
							},
							success: function(o, i) {
								var n = o.rest.hosts;
								if (n) {
									for (var s = r.https ? "https" : "http", a = n.filter((function(
											e, t) {
											if (e.protocol == s) return e
										})), u = 0; u < a.length; u++)
										if (a[u].protocol === s) {
											var l = a[u];
											a.splice(u, 1), a.unshift(l)
										} r.restHosts = a, r.restTotal = a.length;
									try {
										Array.prototype.slice.call(document.documentElement
											.childNodes, 0)[0].nodeType
									} catch (e) {
										(function(e) {
											for (var t = [], r = 0, o = e.length; r < o; r++) t
												.push(e[r]);
											return t
										})
									}
									var c = o["msync-ws"].hosts;
									if (c) {
										var p = c.filter((function(e, t) {
											if (e.protocol == s) return e
										}));
										for (u = 0; u < p.length; u++)
											if (p[u].protocol === s) {
												l = p[u];
												p.splice(u, 1), p.unshift(l)
											} r.socketHost = p, r.hostTotal = p.length, r
											.getRestFromHttpDNS(e, t)
									}
								}
							} || O,
							error: function(o, i, n) {
								r.dnsIndex++, r.dnsIndex < r.dnsTotal && r.getHttpDNS(e, t)
							} || O
						};
					n.ajax(o).catch((function(e) {
						console.warn(e)
					}))
				}, b.prototype.signup = function(e) {
					v.debug("signup");
					var t = this,
						r = e.orgName || "",
						o = e.appName || "",
						i = e.appKey || this.appKey,
						s = e.success || O,
						a = e.error || O;
					if (!r && !o && i) {
						var u = i.split("#");
						2 === u.length && (r = u[0], o = u[1])
					}
					if (r || o) {
						e.https || this.https;
						var l = (e.apiUrl || this.apiUrl) + "/" + r + "/" + o + "/users",
							c = {
								username: e.username,
								password: e.password,
								nickname: e.nickname || ""
							},
							p = {
								url: l,
								dataType: "json",
								data: n.stringify(c),
								success: s,
								error: function(r, o, i) {
									if (t.isHttpDNS && t.restIndex + 1 < t.restTotal) return t
										.restIndex++, void t.getRestFromHttpDNS(e, "signup");
									t.clear(), a(r)
								}
							};
						return n.ajax(p).catch((function(e) {
							console.warn(e)
						}))
					}
					a({
						type: N.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR
					})
				}, b.prototype.open = function(e) {
					var t = e.appKey,
						r = t.split("#")[0],
						o = t.split("#")[1];
					this.orgName = r, this.appName = o, e.accessToken && (this.token = e.accessToken),
						this.isHttpDNS ? (this.dnsIndex = 0, this.getHttpDNS(e, "login")) : this.login(
							e)
				}, b.prototype.login = function(e) {
					if (this.user = e.user, function(e, t) {
							if ("" == (e = e || {}).user) return t.onError({
								type: N.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,
								message: "the user cannot be empty"
							}), !1;
							var r = e.user + "" || "",
								o = e.appKey || "",
								n = o.split("#");
							if (2 !== n.length) return t.onError({
								type: N.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,
								message: "the appKey is illegal"
							}), !1;
							var s = n[0],
								a = n[1];
							return s && a ? (t.context.jid = {
									appKey: o,
									name: r,
									domain: t.domain,
									clientResource: t.clientResource
								}, t.context.root = i, t.context.userId = r, t.context.appKey = o, t
								.context.appName = a, t.context.orgName = s, !0) : (t.onError({
								type: N.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,
								message: "the appKey is illegal"
							}), !1)
						}(e, this)) {
						var t = this;
						if (!t.isOpened())
							if (e.accessToken) e.access_token = e.accessToken, this._login(e, t);
							else {
								var r = e.apiUrl || this.apiUrl,
									o = this.context.userId,
									s = e.pwd || "",
									a = this.context.appName,
									u = this.context.orgName,
									l = {
										grant_type: "password",
										username: o,
										password: s,
										timestamp: +new Date
									},
									c = {
										headers: {
											"Content-type": "application/json"
										},
										url: r + "/" + u + "/" + a + "/token",
										dataType: "json",
										data: n.stringify(l),
										success: function(r, o) {
											e.success && e.success(r), t.token = r.access_token, t
												.context.restTokenData = r.access_token, t._login(r,
													t)
										} || O,
										error: function(r, o, i) {
											if (e.error && e.error(), t.isHttpDNS && t.restIndex +
												1 < t.restTotal) return t.restIndex++, void t
												.getRestFromHttpDNS(e, "login");
											t.clear(), r.error && r.error_description ? t.onError({
												type: N.WEBIM_CONNCTION_OPEN_USERGRID_ERROR,
												message: "login failed",
												data: r,
												xhr: o
											}) : t.onError({
												type: N.WEBIM_CONNCTION_OPEN_ERROR,
												message: "login failed",
												data: r,
												xhr: o
											})
										} || O
									};
								n.ajax(c).catch((function(e) {
									console.warn(e)
								}))
							}
					}
				}, b.prototype.close = function(e) {
					this.logOut = !0, this.context.status = N.STATUS_CLOSING, this.sock.close(), this
						.stopHeartBeat(), this.context.status = N.STATUS_CLOSING
				}, b.prototype.recallMessage = function(e) {
					var t = {
						id: this.getUniqueId(),
						type: "recall",
						chatType: "chat" == e.type ? "singleChat" : e.type,
						ackId: e.mid,
						to: e.to,
						success: e.success,
						fail: e.fail
					};
					this.send(t, this)
				}, b.prototype.sendMSync = function(e, t) {
					if (this.sock.readyState === E) return this._base64transform(e, this, !1, t);
					this.unSendMsgArr.push(e), !this.logOut && this.autoReconnectNumTotal < this
						.autoReconnectNumMax && (this.autoReconnectNumTotal <= this.socketHost.length &&
							this.isHttpDNS || !this.isHttpDNS) && (this.offLineSendConnecting = !0, this
							.reconnect()), this.onError({
							type: N.WEBIM_CONNCTION_DISCONNECTED,
							message: "websocket has been disconnected",
							reconnect: !0
						})
				}, b.prototype.getUniqueId = function(e) {
					this.autoIncrement ? this.autoIncrement++ : this.autoIncrement = 1;
					var t = new Date,
						r = new Date(2010, 1, 1);
					return t.getTime() - r.getTime() + this.autoIncrement
				}, b.prototype.send = function(e) {
					(0, p.default)(e, this, n), this._msgHash[e.id] = e
				}, b.prototype.removeRoster = function(e) {
					f.default.operatRoster(e, "remove", this)
				}, b.prototype.subscribe = function(e) {
					f.default.operatRoster(e, "add", this)
				}, b.prototype.subscribed = function(e) {
					f.default.operatRoster(e, "accept", this)
				}, b.prototype.unsubscribed = function(e) {
					f.default.operatRoster(e, "decline", this)
				}, b.prototype.addContact = function(e) {
					var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "",
						r = {
							to: e,
							message: t
						};
					f.default.operatRoster(r, "add", this)
				}, b.prototype.deleteContact = function(e) {
					var t = {
						to: e
					};
					f.default.operatRoster(t, "remove", this)
				}, b.prototype.acceptInvitation = function(e) {
					var t = {
						to: e
					};
					f.default.operatRoster(t, "accept", this)
				}, b.prototype.declineInvitation = function(e) {
					var t = {
						to: e
					};
					f.default.operatRoster(t, "decline", this)
				}, b.prototype.isOpened = function() {
					return this.sock && this.sock.readyState === E
				}, b.prototype.clear = function() {
					var e = this.context.appKey;
					if (this.errorType != N.WEBIM_CONNCTION_DISCONNECTED && this.logOut && (this
							.unSendMsgArr = [], this.offLineSendConnecting = !1, this.context = {
								status: N.STATUS_INIT,
								appKey: e
							}), this.intervalId && clearInterval(this.intervalId), this.restIndex = 0,
						this.hostIndex = 0, this.errorType == N.WEBIM_CONNCTION_CLIENT_LOGOUT || -1 ==
						this.errorType) {
						var t = {
							type: N.WEBIM_CONNCTION_CLIENT_LOGOUT,
							message: "when login or sinup error",
							data: {
								data: "logout"
							}
						};
						this.onError(t)
					}
				}, b.prototype.autoReconnectInterval = 0, b.prototype.times = 1, b.prototype.reconnect =
				function(e) {
					if (v.debug("reconnect: time", this.hostIndex), this.sock.readyState !== E) {
						var t = this;
						t.hostIndex < t.socketHost.length - 1 && t.hostIndex++, setTimeout((function() {
							t._login({
									access_token: t.context.accessToken
								}, t), t.autoReconnectInterval += t.times * t.times, t
								.times++
						}), 1e3 * (0 == this.autoReconnectNumTotal ? 0 : t
							.autoReconnectInterval)), this.autoReconnectNumTotal++
					}
				}, b.prototype.closed = function() {
					var e = {
						data: {
							data: "Closed error"
						},
						type: N.WEBIM_CONNECTION_CLOSED,
						message: "closed error"
					};
					this.onError(e), this.stopHeartBeat()
				}, b.prototype.addToBlackList = function(e) {
					f.default.operatRoster({
						to: e.name
					}, "ban", this)
				}, b.prototype.removeFromBlackList = function(e) {
					f.default.operatRoster({
						to: e.name
					}, "allow", this)
				}, (0, s.default)(b.prototype, g.default), _.connection = b, _.doQuery = function(e, t,
					r) {
					void 0 !== window.cefQuery && window.cefQuery({
						request: e,
						persistent: !1,
						onSuccess: t,
						onFailure: r
					})
				}, _.debug = function(e) {};
			var I = _;
			t.default = I
		}, function(e, t, r) {
			"use strict";

			function o() {
				return e.exports = o = Object.assign || function(e) {
					for (var t = 1; t < arguments.length; t++) {
						var r = arguments[t];
						for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o])
					}
					return e
				}, o.apply(this, arguments)
			}
			e.exports = o
		}, function(e, t, r) {
			"use strict";

			function o(e) {
				this.array = void 0 === e ? [] : new Array(e)
			}
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0, o.prototype = {
				length: function() {
					return this.array.length
				},
				at: function(e) {
					return this.array[e]
				},
				set: function(e, t) {
					this.array[e] = t
				},
				push: function(e) {
					return this.array.push(e)
				},
				slice: function(e, t) {
					return this.array = this.array.slice(e, t)
				},
				concat: function(e) {
					this.array = this.array.concat(e)
				},
				remove: function(e, t) {
					t = void 0 === t ? 1 : t, this.array.splice(e, t)
				},
				join: function(e) {
					return this.array.join(e)
				},
				clear: function() {
					this.array.length = 0
				}
			};
			var i = function() {
				this._array_h = new o
			};
			i.prototype = {
				_index: 0,
				push: function(e) {
					this._array_h.push(e)
				},
				pop: function() {
					var e = null;
					return this._array_h.length() && (e = this._array_h.at(this._index), 2 * ++
						this._index >= this._array_h.length() && (this._array_h.slice(this
							._index), this._index = 0)), e
				},
				head: function() {
					var e = null,
						t = this._array_h.length();
					return t && (e = this._array_h.at(t - 1)), e
				},
				tail: function() {
					var e = null;
					return this._array_h.length() && (e = this._array_h.at(this._index)), e
				},
				length: function() {
					return this._array_h.length() - this._index
				},
				empty: function() {
					return 0 === this._array_h.length()
				},
				clear: function() {
					this._array_h.clear()
				}
			};
			var n = i;
			t.default = n
		}, function(e, t, r) {
			"use strict";

			function o(e, t) {
				for (var r = 0; r < t.length; r++) {
					var o = t[r];
					o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o
						.writable = !0), Object.defineProperty(e, o.key, o)
				}
			}
			e.exports = function(e, t, r) {
				return t && o(e.prototype, t), r && o(e, r), e
			}
		}, function(e, t, r) {
			"use strict";
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.traceForIE = function() {
				console.log && (console.log.apply ? console.log.apply(console, arguments) : Function
					.prototype.apply.apply(console.log, [console, arguments]));
				console.trace && console.trace()
			}, t.isIE = void 0;
			var o = "undefined" != typeof window && void 0 !== window.navigator && /Trident\/|MSIE /
				.test(window.navigator.userAgent);
			t.isIE = o
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i, n, s, a, u = o(r(4));
			Object.keys || (Object.keys = (i = Object.prototype.hasOwnProperty, n = !{
				toString: null
			}.propertyIsEnumerable("toString"), a = (s = ["toString", "toLocaleString",
				"valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
				"constructor"
			]).length, function(e) {
				if ("object" !== (0, u.default)(e) && ("function" != typeof e || null ===
					e)) throw new TypeError("Object.keys called on non-object");
				var t, r, o = [];
				for (t in e) i.call(e, t) && o.push(t);
				if (n)
					for (r = 0; r < a; r++) i.call(e, s[r]) && o.push(s[r]);
				return o
			}));
			var l = {
					emptyfn: function() {},
					stringify: function(e) {
						if ("undefined" != typeof JSON && JSON.stringify) return JSON.stringify(e);
						var t = "",
							r = [];
						return function e(o) {
							var i = !1;
							for (var n in "[object Array]" === Object.prototype.toString.call(
									o) ? (r.push("]", "["), i = !0) : "[object Object]" ===
									Object.prototype.toString.call(o) && r.push("}", "{"), o)
								"[object Null]" === Object.prototype.toString.call(o[n]) ? o[
								n] = "null" : "[object Undefined]" === Object.prototype.toString
								.call(o[n]) && (o[n] = "undefined"), o[n] && "object" === (0, u
									.default)(o[n]) ? t += "," + (i ? "" : '"' + n + '":' + (i ?
									'"' : "")) + e(o[n]) : t += ',"' + (i ? "" : n + '":"') + o[
									n] + '"';
							return "" != t && (t = t.slice(1)), r.pop() + t + r.pop()
						}(e)
					},
					getFileSize: function(e) {
						var t = this.getFileLength(e);
						if (t > 1e7) return !1;
						var r = Math.round(t / 1e3);
						if (r < 1e3) t = r + " KB";
						else if (r >= 1e3) {
							var o = r / 1e3;
							if (o < 1e3) t = o.toFixed(1) + " MB";
							else t = (o / 1e3).toFixed(1) + " GB"
						}
						return t
					},
					trim: function(e) {
						return (e = "string" == typeof e ? e : "").trim ? e.trim() : e.replace(
							/^\s|\s$/g, "")
					},
					parseTextMessage: function(e, t) {
						if ("string" == typeof e) {
							if ("[object Object]" !== Object.prototype.toString.call(t)) return {
								isemoji: !1,
								body: [{
									type: "txt",
									data: e
								}]
							};
							var r = e,
								o = [],
								i = r.match(/\[[^[\]]{2,3}\]/gm);
							if (!i || i.length < 1) return {
								isemoji: !1,
								body: [{
									type: "txt",
									data: e
								}]
							};
							for (var n = !1, s = 0; s < i.length; s++) {
								var a = r.substring(0, r.indexOf(i[s])),
									u = WebIM.Emoji.map[i[s]];
								if (a && o.push({
										type: "txt",
										data: a
									}), u) {
									var l = WebIM.Emoji.map ? WebIM.Emoji.path + u : null;
									l ? (n = !0, o.push({
										type: "emoji",
										data: l
									})) : o.push({
										type: "txt",
										data: i[s]
									});
									var c = r.indexOf(i[s]) + i[s].length;
									r = r.substring(c)
								} else o.push({
									type: "txt",
									data: i[s]
								})
							}
							return r && o.push({
								type: "txt",
								data: r
							}), n ? {
								isemoji: n,
								body: o
							} : {
								isemoji: !1,
								body: [{
									type: "txt",
									data: e
								}]
							}
						}
					},
					ts: function() {
						var e = new Date,
							t = e.getHours(),
							r = e.getMinutes(),
							o = e.getSeconds();
						return (t < 10 ? "0" + t : t) + ":" + (r < 10 ? "0" + r : r) + ":" + (o <
							10 ? "0" + o : o) + ":" + e.getMilliseconds() + " "
					},
					getObjectKey: function(e, t) {
						for (var r in e)
							if (e[r] == t) return r;
						return ""
					},
					sprintf: function() {
						var e, t, r = arguments,
							o = r[0] || "";
						for (e = 1, t = r.length; e < t; e++) o = o.replace(/%s/, r[e]);
						return o
					},
					reverse: function(e) {
						var t = [];
						if (Array.prototype.reverse) t = e.reverse();
						else
							for (var r = 0; r < e.length; r++) t.unshift(e[r]);
						return t
					},
					checkArray: function(e, t) {
						var r = "off";
						if (e.forEach((function(e, o) {
								if (e.name === t.name) return r = "on", o
							})), "off" == r) return !1
					}
				},
				c = l;
			t.default = c
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i = o(r(8)),
				n = function(e, t, r) {
					var o = r.context.root.lookup("easemob.pb.MUCBody").decode(e.payload);
					new i.default(e.id.low, e.id.high, e.id.unsigned).toString();
					! function(e) {
						var t = {
							type: "",
							owner: o.from.name,
							gid: o.mucId.name,
							from: o.from.name,
							fromJid: o.from,
							to: o.to.length ? o.to[0].name : "",
							toJid: o.to,
							chatroom: o.isChatroom,
							status: o.status
						};
						({
							32: function() {
								t.type = o.isChatroom ? "rmChatRoomMute" : "rmGroupMute", r
									.onPresence(t)
							},
							31: function() {
								t.type = o.isChatroom ? "muteChatRoom" : "muteGroup", r
									.onPresence(t)
							},
							30: function() {
								t.type = o.isChatroom ? "rmUserFromChatRoomWhiteList" :
									"rmUserFromGroupWhiteList", r.onPresence(t)
							},
							29: function() {
								t.type = o.isChatroom ? "addUserToChatRoomWhiteList" :
									"addUserToGroupWhiteList", r.onPresence(t)
							},
							28: function() {
								t.type = "deleteFile", r.onPresence(t)
							},
							27: function() {
								t.type = "uploadFile", r.onPresence(t)
							},
							26: function() {
								t.type = "deleteAnnouncement", r.onPresence(t)
							},
							25: function() {
								t.type = "updateAnnouncement", r.onPresence(t)
							},
							24: function() {
								t.type = "removeMute", r.onPresence(t)
							},
							23: function() {
								t.type = "addMute", r.onPresence(t)
							},
							22: function() {
								t.type = "removeAdmin", r.onPresence(t)
							},
							21: function() {
								t.type = "addAdmin", r.onPresence(t)
							},
							20: function() {
								t.type = "changeOwner", r.onPresence(t)
							},
							19: function() {
								t.type = "direct_joined", r.onPresence(t)
							},
							18: function() {
								t.type = o.isChatroom ? "leaveChatRoom" : "leaveGroup", r
									.onPresence(t)
							},
							17: function() {
								t.type = o.isChatroom ? "memberJoinChatRoomSuccess" :
									"memberJoinPublicGroupSuccess", r.onPresence(t)
							},
							16: function() {
								t.type = "unblock", r.onPresence(t)
							},
							15: function() {
								t.type = "block", r.onPresence(t)
							},
							14: function() {
								t.type = "update", r.onPresence(t)
							},
							13: function() {
								t.type = "allow", t.reason = o.reason, r.onPresence(t)
							},
							12: function() {
								t.type = "ban", r.onPresence(t)
							},
							11: function() {
								t.type = "getBlackList", r.onPresence(t)
							},
							10: function() {
								t.type = "removedFromGroup", t.kicked = t.to, r.onPresence(t)
							},
							9: function() {
								t.type = "invite_decline", t.kicked = t.to, r.onPresence(t)
							},
							8: function() {
								t.type = "invite_accept", t.kicked = t.to, r.onPresence(t)
							},
							7: function() {
								t.type = "invite", t.kicked = t.to, r.onPresence(t)
							},
							6: function() {
								t.type = "joinPublicGroupDeclined", r.onPresence(t)
							},
							5: function() {
								t.type = "joinPublicGroupSuccess", r.onPresence(t)
							},
							4: function() {
								t.type = "joinGroupNotifications", t.reason = o.reason, r
									.onPresence(t)
							},
							3: function() {
								t.type = "leave", r.onPresence(t)
							},
							2: function() {
								t.type = "join", r.onPresence(t)
							},
							1: function() {
								t.type = "deleteGroupChat", r.onPresence(t)
							}
						} [e] || function() {
							console.log("%c没有匹配".concat(e, "类型"), "background: green")
						})()
					}(o.operation)
				};
			t.default = n
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i = o(r(8)),
				n = {
					handleMessage: function(e, t, r) {
						var o = r.context.root.lookup("easemob.pb.RosterBody").decode(e.payload),
							n = (new i.default(e.id.low, e.id.high, e.id.unsigned).toString(), {
								to: o.to[0].name,
								from: o.from.name,
								status: o.reason
							});
						switch (o.operation) {
							case 0:
								break;
							case 2:
								n.type = "subscribe", r.onContactInvited(n), console.warn(
									"in onPresence function, case subscribe is no longer maintained from version 3.3.0.\n                Please use onContactInvited instead. \n                refer to the documentation for details: \n                http://docs-im.easemob.com/im/web/basics/buddy"
									);
								break;
							case 3:
								n.type = "unsubscribed", r.onContactDeleted(n), console.warn(
									"in onPresence function, case unsubscribed is no longer maintained from version 3.3.0.\n                Please use onContactDeleted instead. \n                refer to the documentation for details: \n                http://docs-im.easemob.com/im/web/basics/buddy"
									);
								break;
							case 4:
								n.type = "subscribed", r.onContactAdded(n), console.warn(
									"in onPresence function, case subscribed is no longer maintained from version 3.3.0.\n                Please use onContactAdded instead. \n                refer to the documentation for details: \n                http://docs-im.easemob.com/im/web/basics/buddy"
									);
								break;
							case 5:
								n.type = "unsubscribed", r.onContactRefuse(n), console.warn(
									"in onPresence function, case unsubscribed is no longer maintained from version 3.3.0.\n                Please use onContactRefuse instead. \n                refer to the documentation for details: \n                http://docs-im.easemob.com/im/web/basics/buddy"
									);
								break;
							case 6:
							case 7:
								r.getBlacklist();
								break;
							case 8:
								n.type = "subscribed", r.onContactAgreed(n), console.warn(
									"in onPresence function, case subscribed is no longer maintained from version 3.3.0.\n                Please use onContactAgreed instead. \n                refer to the documentation for details: \n                http://docs-im.easemob.com/im/web/basics/buddy"
									);
								break;
							case 9:
								n.type = "unsubscribed", r.onContactRefuse(n), console.warn(
									"in onPresence function, case unsubscribed is no longer maintained from version 3.3.0.\n                Please use onContactRefuse instead. \n                refer to the documentation for details: \n                http://docs-im.easemob.com/im/web/basics/buddy"
									)
						}
						r.onPresence(n)
					},
					operatRoster: function(e, t, r) {
						var o = [],
							i = r.context.root.lookup("easemob.pb.RosterBody"),
							n = i.decode(o);
						"add" === t ? n.operation = 2 : "remove" === t ? n.operation = 3 :
							"accept" === t ? n.operation = 4 : "decline" === t ? n.operation = 5 :
							"ban" === t ? n.operation = 6 : "allow" === t && (n.operation = 7), n
							.from = r.context.jid;
						var s = [];
						if ("string" == typeof e.to) s.push({
							appKey: r.appKey || r.context.appKey,
							name: e.to,
							domain: "easemob.com"
						});
						else if (e.to instanceof Array)
							for (var a = 0; a < e.to.length; a++) s.push({
								appKey: r.appKey,
								name: e.to[a],
								domain: "easemob.com"
							});
						n.to = s, n.reason = e.message, n = i.encode(n).finish();
						var u = r.context.root.lookup("easemob.pb.Meta").decode(o);
						u.id = e.id || r.getUniqueId(), u.from = r.context.jid, u.to = {
							domain: "@easemob.com"
						}, u.ns = 3, u.payload = n;
						var l = r.context.root.lookup("easemob.pb.CommSyncUL"),
							c = l.decode(o);
						c.meta = u, c = l.encode(c).finish();
						var p = r.context.root.lookup("easemob.pb.MSync"),
							h = p.decode(o);
						h.version = r.version, h.encryptType = [0], h.command = 0, h.guid = r.jid, h
							.payload = c, h = p.encode(h).finish(), r.sendMSync(h)
					}
				};
			t.default = n
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i = o(r(8)),
				n = (0, o(r(7)).default)(),
				s = function(e, t, r) {
					var o = r.context.root.lookup("easemob.pb.StatisticsBody").decode(e.payload);
					new i.default(e.id.low, e.id.high, e.id.unsigned).toString();
					switch (o.operation) {
						case 0:
							r.onStatisticMessage(o);
							break;
						case 1:
							var s = {
								type: n.WEBIM_CONNCTION_USER_REMOVED,
								message: "user has been removed"
							};
							r.logOut = !0, r.onError(s);
							break;
						case 2:
							s = {
								type: n.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,
								message: "the user is already logged on another device"
							};
							r.logOut = !0, r.onError(s);
							break;
						case 3:
							s = {
								type: n.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,
								message: "the user was kicked by changing password"
							};
							r.logOut = !0, r.onError(s);
							break;
						case 4:
							s = {
								type: n.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,
								message: "the user was kicked by other device"
							};
							r.logOut = !0, r.onError(s)
					}
				};
			t.default = s
		}, function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i, n = o(r(64)),
				s = o(r(32)),
				a = o(r(7)),
				u = o(r(28)),
				l = (0, a.default)(),
				c = (i = {
					mr_cache: [],
					_fetchMessages: function(e, t) {
						var r = e.accessToken || t.context.accessToken;
						if (t._utils.isCanSetRequestHeader)
							if (r) {
								var o = t.apiUrl || this.apiUrl,
									i = t.context.appName,
									n = t.context.orgName;
								if (!i || !n) return void t.onError({
									type: l.WEBIM_CONNCTION_AUTH_ERROR,
									message: "appName or orgName is illegal"
								});
								if (!e.queue) return void t.onError({
									type: l.SDK_RUNTIME_ERROR,
									message: "queue is not specified"
								});
								var a = e.queue,
									c = this.mr_cache[a] || (this.mr_cache[a] = {
										msgs: []
									}),
									p = t.context.userId,
									h = -1;
								if (c.msgs.length >= e.count || c.is_last) return void(
									"function" == typeof e.success && e.success(c));
								c && c.next_key && (h = c.next_key);
								var d = {
										queue: a + (e.isGroup ? "@conference.easemob.com" :
											"@easemob.com"),
										start: h,
										end: -1
									},
									f = {
										url: o + "/" + n + "/" + i + "/users/" + p +
											"/messageroaming",
										dataType: "json",
										type: "POST",
										headers: {
											Authorization: "Bearer " + r
										},
										data: JSON.stringify(d),
										success: function(r, o) {
											if (r && r.data) {
												var i = r.data;
												if (!r.data.msgs) return "function" ==
													typeof e.success && e.success(c), c
													.is_last = !0, void(c.next_key = "");
												var n = i.msgs,
													a = n.length;
												c.is_last = i.is_last, c.next_key = i
													.next_key;
												var l = function(e) {
													for (var r = [], o = 0, i = (e = u
															.default.atob(e))
														.length; o < i; ++o) r.push(e
														.charCodeAt(o));
													var n = t.context.root.lookup(
														"easemob.pb.Meta");
													if (1 == (n = n.decode(r)).ns)
														return (0, s.default)(n, {
															errorCode: 0,
															reason: ""
														}, t, !0)
												};
												try {
													for (var p = 0; p < a; p++) {
														var h = l(n[p].msg);
														h && c.msgs.push(h)
													}
												} catch (e) {
													console.log(e)
												} finally {
													"function" == typeof e.success && e
														.success(c)
												}
											}
										} || t._utils.emptyfn,
										error: function(e, r) {
											e.error && e.error_description && t.onError({
												type: l
													.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,
												message: "fetch history messages error",
												msg: e.error_description,
												data: e
											})
										} || t._utils.emptyfn
									};
								t._utils.ajax(f)
							} else t.onError({
								type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
								message: "token not assign error"
							});
						else t.onError({
							type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
							message: "current environment can not set request header"
						})
					},
					fetchHistoryMessages: function(e) {
						var t = this;
						return new Promise((function(r, o) {
							if (e.queue) {
								var i = e.count || 20;
								! function n() {
									t._fetchMessages({
										count: i,
										isGroup: !!e.isGroup,
										queue: e.queue,
										success: function(o) {
											if (o.msgs.length >= i || o
												.is_last) {
												var s = t._utils
													.reverse(o.msgs
														.splice(0, i));
												e.success && e.success(
													s), r(s)
											} else n()
										},
										fail: function(t) {
											o(t), e.fail && e.fail(t)
										}
									}, t)
								}()
							} else t.onError({
								type: l.SDK_RUNTIME_ERROR,
								message: "queue is not specified"
							})
						}))
					},
					getChatRooms: function(e) {
						var t = this,
							r = e.accessToken || this.context.accessToken;
						if (t._utils.isCanSetRequestHeader) {
							if (r) {
								var o = e.apiUrl || this.apiUrl,
									i = this.context.appName,
									n = this.context.orgName;
								if (!i || !n) return void t.onError({
									type: l.WEBIM_CONNCTION_AUTH_ERROR,
									message: "appName or orgName is illegal"
								});
								var s = {
									url: o + "/" + n + "/" + i + "/chatrooms",
									dataType: "json",
									type: "GET",
									headers: {
										Authorization: "Bearer " + r
									},
									data: {
										pagenum: parseInt(e.pagenum) || 1,
										pagesize: parseInt(e.pagesize) || 20
									},
									success: function(t, r) {
										"function" == typeof e.success && e.success(t)
									} || t._utils.emptyfn,
									error: function(e, r, o) {
										e.error && e.error_description && t.onError({
											type: l
												.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,
											message: e.error_description,
											data: e,
											xhr: r
										})
									} || t._utils.emptyfn
								};
								return t._utils.ajax(s)
							}
							t.onError({
								type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
								message: "token not assign error"
							})
						} else t.onError({
							type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
							message: "current environment can not set request header"
						})
					},
					createChatRoom: function(e) {
						e = e || {};
						if (this._utils.isCanSetRequestHeader) {
							var t = this,
								r = e.accessToken || this.token,
								o = t.user;
							if (r) {
								var i = e.apiUrl || this.apiUrl,
									n = this.context.appName,
									s = this.context.orgName;
								if (!n || !s) return void t.onError({
									type: l.WEBIM_CONNCTION_AUTH_ERROR,
									message: "appName or orgName is illegal"
								});
								var a = {
										name: e.name,
										description: e.description,
										maxusers: e.maxusers,
										owner: o,
										members: e.members
									},
									u = {
										url: i + "/" + s + "/" + n + "/chatrooms",
										dataType: "json",
										type: "POST",
										data: JSON.stringify(a),
										headers: {
											Authorization: "Bearer " + r,
											"Content-Type": "application/json"
										},
										success: function(t, r) {
											"function" == typeof e.success && e.success(t)
										} || t._utils.emptyfn,
										error: function(t, r, o) {
											"function" == typeof e.error && e.error(t)
										} || t._utils.emptyfn
									};
								return t._utils.ajax(u)
							}
							t.onError({
								type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
								message: "token not assign error"
							})
						} else t.onError({
							type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
							message: "current environment can not set request header"
						})
					},
					destroyChatRoom: function(e) {
						e = e || {};
						if (this._utils.isCanSetRequestHeader) {
							var t = this,
								r = e.accessToken || this.token;
							if (r) {
								var o = e.apiUrl || this.apiUrl,
									i = this.context.appName,
									n = this.context.orgName,
									s = e.chatRoomId;
								if (!i || !n) return void t.onError({
									type: l.WEBIM_CONNCTION_AUTH_ERROR,
									message: "appName or orgName is illegal"
								});
								var a = {
									url: o + "/" + n + "/" + i + "/chatrooms/" + s,
									dataType: "json",
									type: "DELETE",
									headers: {
										Authorization: "Bearer " + r
									},
									success: function(t, r) {
										"function" == typeof e.success && e.success(t)
									} || t._utils.emptyfn,
									error: function(t, r, o) {
										"function" == typeof e.error && e.error(t)
									} || t._utils.emptyfn
								};
								return t._utils.ajax(a)
							}
							t.onError({
								type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
								message: "token not assign error"
							})
						} else t.onError({
							type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
							message: "current environment can not set request header"
						})
					},
					getChatRoomDetails: function(e) {
						var t = e.chatRoomId,
							r = this.context.appName,
							o = this.context.orgName;
						if (r && o) {
							var i = {
								url: (e.apiUrl || this.apiUrl) + "/" + o + "/" + r +
									"/chatrooms/" + t,
								dataType: "json",
								type: "GET",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
							return i.success = e.success || this._utils.emptyfn, i.error = e
								.error || this._utils.emptyfn, this._utils.ajax(i)
						}
						conn.onError({
							type: l.WEBIM_CONNCTION_AUTH_ERROR,
							message: "appName or orgName is illegal"
						})
					},
					modifyChatRoom: function(e) {
						var t = e.chatRoomId,
							r = {
								groupname: e.chatRoomName,
								description: e.description,
								maxusers: e.maxusers
							},
							o = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatrooms/" + t,
								type: "PUT",
								data: JSON.stringify(r),
								dataType: "json",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					},
					removeSingleChatRoomMember: function(e) {
						var t = e.chatRoomId,
							r = e.username,
							o = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatrooms/" + t + "/users/" + r,
								type: "DELETE",
								dataType: "json",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					},
					removeMultiChatRoomMember: function(e) {
						var t = e.chatRoomId,
							r = e.users.join(","),
							o = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatrooms/" + t + "/users/" + r,
								type: "DELETE",
								dataType: "json",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					},
					addUsersToChatRoom: function(e) {
						var t = e.chatRoomId,
							r = {
								usernames: e.users
							},
							o = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatrooms/" + t + "/users",
								type: "POST",
								data: JSON.stringify(r),
								dataType: "json",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					},
					joinChatRoom: function(e) {
						e = e || {};
						if (this._utils.isCanSetRequestHeader) {
							var t = this,
								r = e.accessToken || this.token;
							if (r) {
								var o = e.apiUrl || this.apiUrl,
									i = this.context.appName,
									n = this.context.orgName,
									s = e.roomId,
									a = e.message || "";
								if (!i || !n) return void t.onError({
									type: l.WEBIM_CONNCTION_AUTH_ERROR,
									message: "appName or orgName is illegal"
								});
								var u = {
									url: o + "/" + n + "/" + i + "/chatrooms/" + s +
										"/apply",
									dataType: "json",
									type: "POST",
									data: JSON.stringify({
										message: a
									}),
									headers: {
										Authorization: "Bearer " + r,
										"Content-Type": "application/json"
									},
									success: function(t, r) {
										"function" == typeof e.success && e.success(t)
									} || t._utils.emptyfn,
									error: function(t, r, o) {
										"function" == typeof e.error && e.error(t)
									} || t._utils.emptyfn
								};
								return t._utils.ajax(u)
							}
							t.onError({
								type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
								message: "token not assign error"
							})
						} else t.onError({
							type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
							message: "current environment can not set request header"
						})
					},
					quitChatRoom: function(e) {
						e = e || {};
						if (this._utils.isCanSetRequestHeader) {
							var t = this,
								r = e.accessToken || this.token;
							if (r) {
								var o = e.apiUrl || this.apiUrl,
									i = this.context.appName,
									n = this.context.orgName,
									s = e.roomId;
								if (!i || !n) return void t.onError({
									type: l.WEBIM_CONNCTION_AUTH_ERROR,
									message: "appName or orgName is illegal"
								});
								var a = {
									url: o + "/" + n + "/" + i + "/chatrooms/" + s +
										"/quit",
									dataType: "json",
									type: "DELETE",
									headers: {
										Authorization: "Bearer " + r
									},
									success: function(r, o) {
										t._load_msg_cache = t._load_msg_cache.filter((
												function(t) {
													if (!t.isGroup || t.to != e
														.roomId) return t
												})), "function" == typeof e.success && e
											.success(r)
									} || t._utils.emptyfn,
									error: function(t, r, o) {
										"function" == typeof e.error && e.error(t)
									} || t._utils.emptyfn
								};
								return t._utils.ajax(a)
							}
							t.onError({
								type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
								message: "token not assign error"
							})
						} else t.onError({
							type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
							message: "current environment can not set request header"
						})
					},
					createGroupNew: function(e) {
						if (e && e.data) {
							e.data.owner = this.user, e.data.hasOwnProperty(
								"inviteNeedConfirm") && (e.data.invite_need_confirm = e.data
									.inviteNeedConfirm, delete e.data.inviteNeedConfirm);
							var t = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatgroups",
								dataType: "json",
								type: "POST",
								data: JSON.stringify(e.data),
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
							return t.success = function(t) {
									e.success(t), this.onCreateGroup(t)
								}.bind(this), t.error = e.error || this._utils.emptyfn, this
								._utils.ajax(t)
						}
					},
					blockGroup: function(e) {
						var t = e.groupId;
						t = "notification_ignore_" + t;
						var r = {
							entities: []
						};
						r.entities[0] = {}, r.entities[0][t] = !0;
						var o = {
							type: "PUT",
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/users/" + this.user,
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					},
					listGroups: function(e) {
						var t = [];
						if (t.limit = e.limit, t.cursor = e.cursor, t.cursor || delete t.cursor,
							isNaN(e.limit)) throw 'The parameter "limit" should be a number';
						var r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/publicchatgroups",
							type: "GET",
							dataType: "json",
							data: t,
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
						return r.success = e.success || this._utils.emptyfn, r.error = e
							.error || this._utils.emptyfn, this._utils.ajax(r)
					},
					getGroup: function() {
						var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] :
							{},
							t = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/users/" + this.user + "/joined_chatgroups",
								dataType: "json",
								type: "GET",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
						return t.success = e.success || this._utils.emptyfn, t.error = e
							.error || this._utils.emptyfn, this._utils.ajax(t)
					},
					changeOwner: function(e) {
						var t = {
								newowner: e.newOwner
							},
							r = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatgroups/" + e.groupId,
								type: "PUT",
								dataType: "json",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								},
								data: JSON.stringify(t)
							};
						return r.success = e.success || this._utils.emptyfn, r.error = e
							.error || this._utils.emptyfn, this._utils.ajax(r)
					},
					getGroupInfo: function(e) {
						var t = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + e.groupId + "?joined_time=true",
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
						return t.success = e.success || this._utils.emptyfn, t.error = e
							.error || this._utils.emptyfn, this._utils.ajax(t)
					},
					modifyGroup: function(e) {
						var t = e.groupId,
							r = {
								groupname: e.groupName,
								description: e.description
							},
							o = {
								url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
									"/chatgroups/" + t,
								type: "PUT",
								data: JSON.stringify(r),
								dataType: "json",
								headers: {
									Authorization: "Bearer " + this.token,
									"Content-Type": "application/json"
								}
							};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					},
					listGroupMember: function(e) {
						if (isNaN(e.pageNum) || e.pageNum <= 0)
						throw 'The parameter "pageNum" should be a positive number';
						if (isNaN(e.pageSize) || e.pageSize <= 0)
						throw 'The parameter "pageSize" should be a positive number';
						if (null === e.groupId && void 0 === e.groupId)
						throw 'The parameter "groupId" should be added';
						var t = [],
							r = e.groupId;
						t.pagenum = e.pageNum, t.pagesize = e.pageSize;
						var o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + r + "/users",
							dataType: "json",
							type: "GET",
							data: t,
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
						return o.success = e.success || this._utils.emptyfn, o.error = e
							.error || this._utils.emptyfn, this._utils.ajax(o)
					}
				}, (0, n.default)(i, "listGroupMember", (function(e) {
					if (isNaN(e.pageNum) || e.pageNum <= 0)
					throw 'The parameter "pageNum" should be a positive number';
					if (isNaN(e.pageSize) || e.pageSize <= 0)
					throw 'The parameter "pageSize" should be a positive number';
					if (null === e.groupId && void 0 === e.groupId)
					throw 'The parameter "groupId" should be added';
					var t = [],
						r = e.groupId;
					t.pagenum = e.pageNum, t.pagesize = e.pageSize;
					var o = {
						url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
							"/chatgroups/" + r + "/users",
						dataType: "json",
						type: "GET",
						data: t,
						headers: {
							Authorization: "Bearer " + this.token,
							"Content-Type": "application/json"
						}
					};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "listChatRoomMember", (function(e) {
					if (isNaN(e.pageNum) || e.pageNum <= 0)
					throw 'The parameter "pageNum" should be a positive number';
					if (isNaN(e.pageSize) || e.pageSize <= 0)
					throw 'The parameter "pageSize" should be a positive number';
					if (null === e.chatRoomId && void 0 === e.chatRoomId)
					throw 'The parameter "chatRoomId" should be added';
					var t = [],
						r = e.chatRoomId;
					t.pagenum = e.pageNum, t.pagesize = e.pageSize;
					var o = {
						url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
							"/chatrooms/" + r + "/users",
						dataType: "json",
						type: "GET",
						data: t,
						headers: {
							Authorization: "Bearer " + this.token,
							"Content-Type": "application/json"
						}
					};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "getGroupAdmin", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/admin",
							dataType: "json",
							type: "GET",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "getChatRoomAdmin", (function(e) {
					var t = e.chatRoomId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/admin",
							dataType: "json",
							type: "GET",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "setAdmin", (function(e) {
					var t = e.groupId,
						r = {
							newadmin: e.username
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/admin",
							type: "POST",
							dataType: "json",
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "setChatRoomAdmin", (function(e) {
					var t = e.chatRoomId,
						r = {
							newadmin: e.username
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/admin",
							type: "POST",
							dataType: "json",
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeAdmin", (function(e) {
					var t = e.groupId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/admin/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeChatRoomAdmin", (function(e) {
					var t = e.chatRoomId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/admin/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "dissolveGroup", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "?version=v3",
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "quitGroup", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/quit",
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "inviteToGroup", (function(e) {
					var t = e.groupId,
						r = {
							usernames: e.users
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/invite",
							type: "POST",
							data: JSON.stringify(r),
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "joinGroup", (function(e) {
					var t = {
						url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
							"/chatgroups/" + e.groupId + "/apply",
						type: "POST",
						dataType: "json",
						data: JSON.stringify({
							message: e.message || ""
						}),
						headers: {
							Authorization: "Bearer " + this.token,
							"Content-Type": "application/json"
						}
					};
					return t.success = e.success || this._utils.emptyfn, t.error = e
						.error || this._utils.emptyfn, this._utils.ajax(t)
				})), (0, n.default)(i, "agreeJoinGroup", (function(e) {
					var t = e.groupId,
						r = {
							applicant: e.applicant,
							verifyResult: !0,
							reason: "no clue"
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/apply_verify",
							type: "POST",
							dataType: "json",
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "rejectJoinGroup", (function(e) {
					var t = e.groupId,
						r = {
							applicant: e.applicant,
							verifyResult: !1,
							reason: e.reason || ""
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/apply_verify",
							type: "POST",
							dataType: "json",
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "agreeInviteIntoGroup", (function(e) {
					var t = e.groupId,
						r = {
							invitee: e.invitee,
							verifyResult: !0
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/invite_verify",
							type: "POST",
							dataType: "json",
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "rejectInviteIntoGroup", (function(e) {
					var t = e.groupId,
						r = {
							invitee: e.invitee,
							verifyResult: !1
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/invite_verify",
							type: "POST",
							dataType: "json",
							data: JSON.stringify(r),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeSingleGroupMember", (function(e) {
					var t = e.groupId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/users/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeMultiGroupMember", (function(e) {
					var t = e.groupId,
						r = e.users.join(","),
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/users/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "mute", (function(e) {
					var t = e.groupId,
						r = {
							usernames: [e.username],
							mute_duration: e.muteDuration
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/mute",
							dataType: "json",
							type: "POST",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							},
							data: JSON.stringify(r)
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "muteChatRoomMember", (function(e) {
					var t = e.chatRoomId,
						r = {
							usernames: [e.username],
							mute_duration: e.muteDuration
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/mute",
							dataType: "json",
							type: "POST",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							},
							data: JSON.stringify(r)
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeMute", (function(e) {
					var t = e.groupId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/mute/" + r,
							dataType: "json",
							type: "DELETE",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeMuteChatRoomMember", (function(e) {
					var t = e.chatRoomId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/mute/" + r,
							dataType: "json",
							type: "DELETE",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "getMuted", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/mute",
							dataType: "json",
							type: "GET",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "getChatRoomMuted", (function(e) {
					var t = e.chatRoomId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/mute",
							dataType: "json",
							type: "GET",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "groupBlockSingle", (function(e) {
					var t = e.groupId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/blocks/users/" + r,
							type: "POST",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "chatRoomBlockSingle", (function(e) {
					var t = e.chatRoomId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/blocks/users/" + r,
							type: "POST",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "groupBlockMulti", (function(e) {
					var t = e.groupId,
						r = {
							usernames: e.usernames
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/blocks/users",
							data: JSON.stringify(r),
							type: "POST",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "chatRoomBlockMulti", (function(e) {
					var t = e.chatRoomId,
						r = {
							usernames: e.usernames
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/blocks/users",
							data: JSON.stringify(r),
							type: "POST",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeGroupBlockSingle", (function(e) {
					var t = e.groupId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/blocks/users/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeChatRoomBlockSingle", (function(e) {
					var t = e.chatRoomId,
						r = e.username,
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/blocks/users/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeGroupBlockMulti", (function(e) {
					var t = e.groupId,
						r = e.usernames.join(","),
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/blocks/users/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "removeChatRoomBlockMulti", (function(e) {
					var t = e.chatRoomId,
						r = e.usernames.join(","),
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/blocks/users/" + r,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "getGroupBlacklistNew", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/blocks/users",
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "getChatRoomBlacklistNew", (function(e) {
					var t = e.chatRoomId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/blocks/users",
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "disableSendGroupMsg", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/ban",
							type: "POST",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "disableSendChatRoomMsg", (function(e) {
					var t = e.chatRoomId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/ban",
							type: "POST",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "enableSendGroupMsg", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/ban",
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "enableSendChatRoomMsg", (function(e) {
					var t = e.chatRoomId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/ban",
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "addUsersToGroupWhitelist", (function(e) {
					var t = e.groupId,
						r = {
							usernames: e.users
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/white/users",
							type: "POST",
							data: JSON.stringify(r),
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "addUsersToChatRoomWhitelist", (function(e) {
					var t = e.chatRoomId,
						r = {
							usernames: e.users
						},
						o = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/white/users",
							type: "POST",
							data: JSON.stringify(r),
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return o.success = e.success || this._utils.emptyfn, o.error = e
						.error || this._utils.emptyfn, this._utils.ajax(o)
				})), (0, n.default)(i, "rmUsersFromGroupWhitelist", (function(e) {
					var t = e.groupId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/white/users/" + e.userName,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "rmUsersFromChatRoomWhitelist", (function(e) {
					var t = e.chatRoomId,
						r = {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/white/users/" + e.userName,
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "getGroupWhitelist", (function(e) {
					var t = e.groupId,
						r = (e.users, {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/white/users",
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						});
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "getChatRoomWhitelist", (function(e) {
					var t = e.chatRoomId,
						r = (e.users, {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/white/users",
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						});
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "isGroupWhiteUser", (function(e) {
					var t = e.groupId,
						r = (e.users, {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatgroups/" + t + "/white/users/" + e.userName,
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						});
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "isChatRoomWhiteUser", (function(e) {
					var t = e.chatRoomId,
						r = (e.users, {
							url: this.apiUrl + "/" + this.orgName + "/" + this.appName +
								"/chatrooms/" + t + "/white/users/" + e.userName,
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						});
					return r.success = e.success || this._utils.emptyfn, r.error = e
						.error || this._utils.emptyfn, this._utils.ajax(r)
				})), (0, n.default)(i, "getGroupMsgReadUser", (function(e) {
					var t = this;
					e = e || {};
					if (this._utils.isCanSetRequestHeader) {
						var r = e.accessToken || this.token;
						if (r) {
							var o = t.apiUrl,
								i = t.context.appName,
								n = t.context.orgName;
							if (!i || !n) return void t.onError({
								type: l.WEBIM_CONNCTION_AUTH_ERROR,
								message: "appName or orgName is illegal"
							});
							var s = {
								url: o + "/" + n + "/" + i + "/chatgroups/" + e
									.groupId + "/acks/" + e.msgId,
								dataType: "json",
								type: "GET",
								data: {
									limit: 500,
									key: void 0
								},
								headers: {
									Authorization: "Bearer " + r
								},
								success: function(t) {
									"function" == typeof e.success && e.success(t)
								} || this._utils.emptyfn,
								error: function(t) {
									"function" == typeof e.error && e.error(t)
								} || this._utils.emptyfn
							};
							return this._utils.ajax(s)
						}
						t.onError({
							type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
							message: "token not assign error"
						})
					} else conn.onError({
						type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
						message: "current environment can not set request header"
					})
				})), (0, n.default)(i, "getBlacklist", (function(e) {
					var t = this;
					e = e || {};
					if (this._utils.isCanSetRequestHeader) {
						var r = this,
							o = e.accessToken || this.token;
						if (o) {
							var i = e.apiUrl || this.apiUrl,
								n = this.context.appName,
								s = this.context.orgName;
							if (!n || !s) return void r.onError({
								type: l.WEBIM_CONNCTION_AUTH_ERROR,
								message: "appName or orgName is illegal"
							});
							var a = {
								url: i + "/" + s + "/" + n + "/users/" + this.user +
									"/blocks/users",
								dataType: "json",
								type: "GET",
								headers: {
									Authorization: "Bearer " + o
								},
								success: function(r, o) {
									var i = {};
									r.data.forEach((function(e, t) {
											i[e] = {
												name: e
											}
										})), t.onBlacklistUpdate(i), "function" ==
										typeof e.success && e.success(r)
								} || this._utils.emptyfn,
								error: function(r, o, i) {
									t.onBlacklistUpdate([]), "function" == typeof e
										.error && e.error(r)
								} || this._utils.emptyfn
							};
							return this._utils.ajax(a)
						}
						r.onError({
							type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
							message: "token not assign error"
						})
					} else r.onError({
						type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
						message: "current environment can not set request header"
					})
				})), (0, n.default)(i, "getRoster", (function(e) {
					e = e || {};
					var t = this;
					if (this._utils.isCanSetRequestHeader) {
						var r = this,
							o = e.accessToken || this.token;
						if (o) {
							var i = e.apiUrl || this.apiUrl,
								n = this.context.appName,
								s = this.context.orgName;
							if (!n || !s) return void r.onError({
								type: l.WEBIM_CONNCTION_AUTH_ERROR,
								message: "appName or orgName is illegal"
							});
							var a = {
								url: i + "/" + s + "/" + n + "/users/" + this.user +
									"/contacts/users",
								dataType: "json",
								type: "GET",
								headers: {
									Authorization: "Bearer " + o
								},
								success: function(r, o) {
									var i = [];
									r.data.forEach((function(e, r) {
											i.push({
												name: e,
												subscription: "both",
												jid: t.context.jid
											})
										})), "function" == typeof e.success && e
										.success(i), t.onRoster && t.onRoster(i)
								} || this._utils.emptyfn,
								error: function(t, r, o) {
									"function" == typeof e.error && e.error(t)
								} || this._utils.emptyfn
							};
							return this._utils.ajax(a)
						}
						r.onError({
							type: l.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
							message: "token not assign error"
						})
					} else r.onError({
						type: l.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR,
						message: "current environment can not set request header"
					})
				})), (0, n.default)(i, "fetchGroupAnnouncement", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.groupId,
						n = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatgroups/")
								.concat(i, "/announcement"),
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return n.success = e.success || this._utils.emptyfn, n.error = e
						.error || this._utils.emptyfn, this._utils.ajax(n)
				})), (0, n.default)(i, "fetchChatRoomAnnouncement", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.roomId,
						n = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatrooms/")
								.concat(i, "/announcement"),
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return n.success = e.success || this._utils.emptyfn, n.error = e
						.error || this._utils.emptyfn, this._utils.ajax(n)
				})), (0, n.default)(i, "updateGroupAnnouncement", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.groupId,
						n = {
							announcement: e.announcement
						},
						s = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatgroups/")
								.concat(i, "/announcement"),
							type: "POST",
							dataType: "json",
							data: JSON.stringify(n),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return s.success = e.success || this._utils.emptyfn, s.error = e
						.error || this._utils.emptyfn, this._utils.ajax(s)
				})), (0, n.default)(i, "updateChatRoomAnnouncement", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.roomId,
						n = {
							announcement: e.announcement
						},
						s = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatrooms/")
								.concat(i, "/announcement"),
							type: "POST",
							dataType: "json",
							data: JSON.stringify(n),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return s.success = e.success || this._utils.emptyfn, s.error = e
						.error || this._utils.emptyfn, this._utils.ajax(s)
				})), (0, n.default)(i, "uploadGroupSharedFile", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.groupId;
					this._utils.uploadFile({
						uploadUrl: "".concat(t, "/").concat(o, "/").concat(r,
							"/chatgroups/").concat(i, "/share_files"),
						onFileUploadProgress: e.onFileUploadProgress,
						onFileUploadComplete: e.onFileUploadComplete,
						onFileUploadError: e.onFileUploadError,
						onFileUploadCanceled: e.onFileUploadCanceled,
						accessToken: this.token,
						apiUrl: t,
						file: e.file,
						appKey: this.context.appKey
					})
				})), (0, n.default)(i, "uploadChatRoomSharedFile", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.roomId;
					this._utils.uploadFile({
						uploadUrl: "".concat(t, "/").concat(o, "/").concat(r,
							"/chatrooms/").concat(i, "/share_files"),
						onFileUploadProgress: e.onFileUploadProgress,
						onFileUploadComplete: e.onFileUploadComplete,
						onFileUploadError: e.onFileUploadError,
						onFileUploadCanceled: e.onFileUploadCanceled,
						accessToken: this.token,
						apiUrl: t,
						file: e.file,
						appKey: this.context.appKey
					})
				})), (0, n.default)(i, "deleteGroupSharedFile", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.groupId,
						n = e.fileId,
						s = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatgroups/")
								.concat(i, "/share_files/").concat(n),
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return s.success = e.success || this._utils.emptyfn, s.error = e
						.error || this._utils.emptyfn, this._utils.ajax(s)
				})), (0, n.default)(i, "deleteChatRoomSharedFile", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.roomId,
						n = e.fileId,
						s = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatrooms/")
								.concat(i, "/share_files/").concat(n),
							type: "DELETE",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return s.success = e.success || this._utils.emptyfn, s.error = e
						.error || this._utils.emptyfn, this._utils.ajax(s)
				})), (0, n.default)(i, "downloadGroupSharedFile", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.groupId,
						n = e.fileId;
					this._utils.download.call(this, {
						url: "".concat(t, "/").concat(o, "/").concat(r,
								"/chatgroups/").concat(i, "/share_files/").concat(
							n),
						onFileDownloadComplete: e.onFileDownloadComplete,
						onFileDownloadError: e.onFileDownloadError,
						accessToken: this.token,
						id: n,
						secret: ""
					})
				})), (0, n.default)(i, "downloadChatRoomSharedFile", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.roomId,
						n = e.fileId;
					this._utils.download.call(this, {
						url: "".concat(t, "/").concat(o, "/").concat(r,
							"/chatrooms/").concat(i, "/share_files/").concat(n),
						onFileDownloadComplete: e.onFileDownloadComplete,
						onFileDownloadError: e.onFileDownloadError,
						accessToken: this.token,
						id: n,
						secret: ""
					})
				})), (0, n.default)(i, "fetchGroupSharedFileList", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.groupId,
						n = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatgroups/")
								.concat(i, "/share_files"),
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return n.success = e.success || this._utils.emptyfn, n.error = e
						.error || this._utils.emptyfn, this._utils.ajax(n)
				})), (0, n.default)(i, "fetchChatRoomSharedFileList", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = e.roomId,
						n = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/chatrooms/")
								.concat(i, "/share_files"),
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return n.success = e.success || this._utils.emptyfn, n.error = e
						.error || this._utils.emptyfn, this._utils.ajax(n)
				})), (0, n.default)(i, "uploadToken", (function(e) {
					var t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/users/")
								.concat(this.user),
							type: "PUT",
							data: JSON.stringify({
								device_id: e.deviceId,
								device_token: e.deviceToken,
								notifier_name: e.notifierName
							}),
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return i.success = e.success || this._utils.emptyfn, i.error = e
						.error || this._utils.emptyfn, this._utils.ajax(i)
				})), (0, n.default)(i, "getSessionList", (function() {
					var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] :
						{},
						t = e.apiUrl || this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/users/")
								.concat(this.user, "/user_channels"),
							type: "GET",
							dataType: "json",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return i.success = e.success || this._utils.emptyfn, i.error = e
						.error || this._utils.emptyfn, this._utils.ajax(i)
				})), (0, n.default)(i, "updateOwnUserInfo", (function(e, t) {
					var r = this.apiUrl,
						o = this.context.appName,
						i = this.context.orgName,
						n = ["nickname", "avatarurl", "mail", "phone", "gender", "sign",
							"birth", "ext"
						],
						s = new URLSearchParams;
					if ("string" == typeof e) {
						if (!n.includes(e)) throw new Error(
							"illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed"
							);
						s.append(e, t)
					} else {
						if ("[object Object]" != Object.prototype.toString.call(e))
						throw new Error("illegal params");
						n.forEach((function(t) {
							n.includes(t) && null != e[t] && s.append(t, e[t])
						}))
					}
					var a = {
						url: "".concat(r, "/").concat(i, "/").concat(o,
							"/metadata/user/").concat(this.user),
						type: "PUT",
						data: s,
						dataType: "json",
						headers: {
							Authorization: "Bearer " + this.token,
							"Content-Type": "application/x-www-form-urlencoded"
						}
					};
					return this._utils.ajax(a)
				})), (0, n.default)(i, "fetchUserDataById", (function(e) {
					var t = this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = "";
					if ("string" == typeof e) i = e;
					else {
						if ("[object Array]" != Object.prototype.toString.call(e))
						throw new Error("illegal params");
						i = e.join(",")
					}
					var n = {
						url: "".concat(t, "/").concat(o, "/").concat(r,
							"/metadata/user/").concat(i),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + this.token,
							"Content-Type": "application/json"
						}
					};
					return this._utils.ajax(n)
				})), (0, n.default)(i, "fetchUserInfoById", (function(e, t) {
					var r = this.apiUrl,
						o = this.context.appName,
						i = this.context.orgName,
						n = [],
						s = [];
					if ("string" == typeof e) n = [e];
					else {
						if ("[object Array]" != Object.prototype.toString.call(e))
						throw new Error("illegal params");
						n = e
					}
					s = "string" == typeof t ? [t] : "[object Array]" == Object.prototype
						.toString.call(t) ? t : ["nickname", "avatarurl", "mail", "phone",
							"gender", "sign", "birth", "ext"
						];
					var a = {
						url: "".concat(r, "/").concat(i, "/").concat(o,
							"/metadata/user/get"),
						type: "POST",
						data: JSON.stringify({
							targets: n,
							properties: s
						}),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + this.token,
							"Content-Type": "application/json"
						}
					};
					return this._utils.ajax(a)
				})), (0, n.default)(i, "updateCurrentUserNick", (function(e) {
					var t = this.apiUrl,
						r = this.context.appName,
						o = this.context.orgName,
						i = {
							url: "".concat(t, "/").concat(o, "/").concat(r, "/users/")
								.concat(this.user),
							type: "PUT",
							dataType: "json",
							data: JSON.stringify({
								nickname: e
							}),
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							}
						};
					return this._utils.ajax(i)
				})), i);
			t.default = c
		}, function(e, t, r) {
			"use strict";
			e.exports = function(e, t, r) {
				return t in e ? Object.defineProperty(e, t, {
					value: r,
					enumerable: !0,
					configurable: !0,
					writable: !0
				}) : e[t] = r, e
			}
		}, function(e, t, r) {
			"use strict";
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var o = function() {
				return {
					nested: {
						easemob: {
							nested: {
								pb: {
									nested: {
										MessageBody: {
											fields: {
												type: {
													type: "Type",
													id: 1
												},
												from: {
													type: "JID",
													id: 2
												},
												to: {
													type: "JID",
													id: 3
												},
												contents: {
													rule: "repeated",
													type: "Content",
													id: 4
												},
												ext: {
													rule: "repeated",
													type: "KeyValue",
													id: 5
												},
												ackMessageId: {
													type: "uint64",
													id: 6
												},
												msgConfig: {
													type: "MessageConfig",
													id: 7
												},
												ackContent: {
													type: "string",
													id: 8
												}
											},
											nested: {
												Content: {
													fields: {
														type: {
															type: "Type",
															id: 1
														},
														text: {
															type: "string",
															id: 2
														},
														latitude: {
															type: "double",
															id: 3
														},
														longitude: {
															type: "double",
															id: 4
														},
														address: {
															type: "string",
															id: 5
														},
														displayName: {
															type: "string",
															id: 6
														},
														remotePath: {
															type: "string",
															id: 7
														},
														secretKey: {
															type: "string",
															id: 8
														},
														fileLength: {
															type: "int32",
															id: 9
														},
														action: {
															type: "string",
															id: 10
														},
														params: {
															rule: "repeated",
															type: "KeyValue",
															id: 11
														},
														duration: {
															type: "int32",
															id: 12
														},
														size: {
															type: "Size",
															id: 13
														},
														thumbnailRemotePath: {
															type: "string",
															id: 14
														},
														thumbnailSecretKey: {
															type: "string",
															id: 15
														},
														thumbnailDisplayName: {
															type: "string",
															id: 16
														},
														thumbnailFileLength: {
															type: "int32",
															id: 17
														},
														thumbnailSize: {
															type: "Size",
															id: 18
														},
														customEvent: {
															type: "string",
															id: 19
														},
														customExts: {
															rule: "repeated",
															type: "KeyValue",
															id: 20
														}
													},
													nested: {
														Type: {
															values: {
																TEXT: 0,
																IMAGE: 1,
																VIDEO: 2,
																LOCATION: 3,
																VOICE: 4,
																FILE: 5,
																COMMAND: 6,
																CUSTOM: 7
															}
														},
														Size: {
															fields: {
																width: {
																	type: "double",
																	id: 1
																},
																height: {
																	type: "double",
																	id: 2
																}
															}
														}
													}
												},
												Type: {
													values: {
														NORMAL: 0,
														CHAT: 1,
														GROUPCHAT: 2,
														CHATROOM: 3,
														READ_ACK: 4,
														DELIVER_ACK: 5,
														RECALL: 6,
														CHANNEL_ACK: 7
													}
												},
												MessageConfig: {
													fields: {
														allowGroupAck: {
															type: "bool",
															id: 1
														}
													}
												}
											}
										},
										KeyValue: {
											oneofs: {
												value: {
													oneof: ["varintValue", "floatValue",
														"doubleValue", "stringValue"
													]
												}
											},
											fields: {
												key: {
													type: "string",
													id: 1
												},
												type: {
													type: "ValueType",
													id: 2
												},
												varintValue: {
													type: "int64",
													id: 3
												},
												floatValue: {
													type: "float",
													id: 4
												},
												doubleValue: {
													type: "double",
													id: 5
												},
												stringValue: {
													type: "string",
													id: 6
												}
											},
											nested: {
												ValueType: {
													values: {
														BOOL: 1,
														INT: 2,
														UINT: 3,
														LLINT: 4,
														FLOAT: 5,
														DOUBLE: 6,
														STRING: 7,
														JSON_STRING: 8
													}
												}
											}
										},
										JID: {
											fields: {
												appKey: {
													type: "string",
													id: 1
												},
												name: {
													type: "string",
													id: 2
												},
												domain: {
													type: "string",
													id: 3
												},
												clientResource: {
													type: "string",
													id: 4
												}
											}
										},
										ConferenceBody: {
											fields: {
												sessionId: {
													type: "string",
													id: 1
												},
												operation: {
													type: "Operation",
													id: 2
												},
												conferenceId: {
													type: "string",
													id: 3
												},
												type: {
													type: "Type",
													id: 4
												},
												content: {
													type: "string",
													id: 5
												},
												network: {
													type: "string",
													id: 6
												},
												version: {
													type: "string",
													id: 7
												},
												identity: {
													type: "Identity",
													id: 8
												},
												duration: {
													type: "string",
													id: 9
												},
												peerName: {
													type: "string",
													id: 10
												},
												endReason: {
													type: "EndReason",
													id: 11
												},
												status: {
													type: "Status",
													id: 12
												},
												isDirect: {
													type: "bool",
													id: 13
												},
												controlType: {
													type: "StreamControlType",
													id: 14
												},
												routeFlag: {
													type: "int32",
													id: 15
												},
												routeKey: {
													type: "string",
													id: 16
												}
											},
											nested: {
												Status: {
													fields: {
														errorCode: {
															type: "int32",
															id: 1
														}
													}
												},
												Operation: {
													values: {
														JOIN: 0,
														INITIATE: 1,
														ACCEPT_INITIATE: 2,
														ANSWER: 3,
														TERMINATE: 4,
														REMOVE: 5,
														STREAM_CONTROL: 6,
														MEDIA_REQUEST: 7
													}
												},
												Type: {
													values: {
														VOICE: 0,
														VIDEO: 1
													}
												},
												Identity: {
													values: {
														CALLER: 0,
														CALLEE: 1
													}
												},
												EndReason: {
													values: {
														HANGUP: 0,
														NORESPONSE: 1,
														REJECT: 2,
														BUSY: 3,
														FAIL: 4,
														UNSUPPORTED: 5,
														OFFLINE: 6
													}
												},
												StreamControlType: {
													values: {
														PAUSE_VOICE: 0,
														RESUME_VOICE: 1,
														PAUSE_VIDEO: 2,
														RESUME_VIDEO: 3
													}
												}
											}
										},
										MSync: {
											fields: {
												version: {
													type: "Version",
													id: 1,
													options: {
														default: "MSYNC_V1"
													}
												},
												guid: {
													type: "JID",
													id: 2
												},
												auth: {
													type: "string",
													id: 3
												},
												compressAlgorimth: {
													type: "uint32",
													id: 4
												},
												crypto: {
													type: "uint32",
													id: 5
												},
												userAgent: {
													type: "string",
													id: 6
												},
												pov: {
													type: "uint64",
													id: 7
												},
												command: {
													type: "Command",
													id: 8
												},
												deviceId: {
													type: "uint32",
													id: 10
												},
												encryptType: {
													rule: "repeated",
													type: "EncryptType",
													id: 11,
													options: {
														packed: !1
													}
												},
												encryptKey: {
													type: "string",
													id: 12
												},
												payload: {
													type: "bytes",
													id: 9
												}
											},
											nested: {
												Version: {
													values: {
														MSYNC_V1: 0,
														MSYNC_V2: 1
													}
												},
												Command: {
													values: {
														SYNC: 0,
														UNREAD: 1,
														NOTICE: 2,
														PROVISION: 3
													}
												}
											}
										},
										EncryptType: {
											values: {
												ENCRYPT_NONE: 0,
												ENCRYPT_AES_128_CBC: 1,
												ENCRYPT_AES_256_CBC: 2
											}
										},
										CommSyncUL: {
											fields: {
												meta: {
													type: "Meta",
													id: 1
												},
												key: {
													type: "uint64",
													id: 2
												},
												queue: {
													type: "JID",
													id: 3
												},
												isRoam: {
													type: "bool",
													id: 4
												},
												lastFullRoamKey: {
													type: "uint64",
													id: 5
												}
											}
										},
										CommSyncDL: {
											fields: {
												status: {
													type: "Status",
													id: 1
												},
												metaId: {
													type: "uint64",
													id: 2
												},
												serverId: {
													type: "uint64",
													id: 3
												},
												metas: {
													rule: "repeated",
													type: "Meta",
													id: 4
												},
												nextKey: {
													type: "uint64",
													id: 5
												},
												queue: {
													type: "JID",
													id: 6
												},
												isLast: {
													type: "bool",
													id: 7
												},
												timestamp: {
													type: "uint64",
													id: 8
												},
												isRoam: {
													type: "bool",
													id: 9
												}
											}
										},
										CommNotice: {
											fields: {
												queue: {
													type: "JID",
													id: 1
												}
											}
										},
										CommUnreadUL: {
											fields: {}
										},
										CommUnreadDL: {
											fields: {
												status: {
													type: "Status",
													id: 1
												},
												unread: {
													rule: "repeated",
													type: "MetaQueue",
													id: 2
												},
												timestamp: {
													type: "uint64",
													id: 3
												}
											}
										},
										MetaQueue: {
											fields: {
												queue: {
													type: "JID",
													id: 1
												},
												n: {
													type: "uint32",
													id: 2
												}
											}
										},
										Meta: {
											fields: {
												id: {
													type: "uint64",
													id: 1
												},
												from: {
													type: "JID",
													id: 2
												},
												to: {
													type: "JID",
													id: 3
												},
												timestamp: {
													type: "uint64",
													id: 4
												},
												ns: {
													type: "NameSpace",
													id: 5
												},
												payload: {
													type: "bytes",
													id: 6
												},
												routetype: {
													type: "RouteType",
													id: 7
												}
											},
											nested: {
												NameSpace: {
													values: {
														STATISTIC: 0,
														CHAT: 1,
														MUC: 2,
														ROSTER: 3,
														CONFERENCE: 4
													}
												},
												RouteType: {
													values: {
														ROUTE_ALL: 0,
														ROUTE_ONLINE: 1
													}
												}
											}
										},
										Status: {
											fields: {
												errorCode: {
													type: "ErrorCode",
													id: 1
												},
												reason: {
													type: "string",
													id: 2
												},
												redirectInfo: {
													rule: "repeated",
													type: "RedirectInfo",
													id: 3
												}
											},
											nested: {
												ErrorCode: {
													values: {
														OK: 0,
														FAIL: 1,
														UNAUTHORIZED: 2,
														MISSING_PARAMETER: 3,
														WRONG_PARAMETER: 4,
														REDIRECT: 5,
														TOKEN_EXPIRED: 6,
														PERMISSION_DENIED: 7,
														NO_ROUTE: 8,
														UNKNOWN_COMMAND: 9,
														PB_PARSER_ERROR: 10,
														BIND_ANOTHER_DEVICE: 11,
														IM_FORBIDDEN: 12,
														TOO_MANY_DEVICES: 13,
														PLATFORM_LIMIT: 14,
														USER_MUTED: 15,
														ENCRYPT_DISABLE: 16,
														ENCRYPT_ENABLE: 17,
														DECRYPT_FAILURE: 18
													}
												}
											}
										},
										RedirectInfo: {
											fields: {
												host: {
													type: "string",
													id: 1
												},
												port: {
													type: "uint32",
													id: 2
												}
											}
										},
										Provision: {
											fields: {
												osType: {
													type: "OsType",
													id: 1
												},
												version: {
													type: "string",
													id: 2
												},
												networkType: {
													type: "NetworkType",
													id: 3
												},
												appSign: {
													type: "string",
													id: 4
												},
												compressType: {
													rule: "repeated",
													type: "CompressType",
													id: 5,
													options: {
														packed: !1
													}
												},
												encryptType: {
													rule: "repeated",
													type: "EncryptType",
													id: 6,
													options: {
														packed: !1
													}
												},
												encryptKey: {
													type: "string",
													id: 7
												},
												status: {
													type: "Status",
													id: 8
												},
												deviceUuid: {
													type: "string",
													id: 9
												},
												isManualLogin: {
													type: "bool",
													id: 10
												},
												password: {
													type: "string",
													id: 11
												},
												deviceName: {
													type: "string",
													id: 12
												},
												resource: {
													type: "string",
													id: 13
												},
												auth: {
													type: "string",
													id: 14
												}
											},
											nested: {
												OsType: {
													values: {
														OS_IOS: 0,
														OS_ANDROID: 1,
														OS_LINUX: 2,
														OS_OSX: 3,
														OS_WIN: 4,
														OS_OTHER: 16
													}
												},
												NetworkType: {
													values: {
														NETWORK_NONE: 0,
														NETWORK_WIFI: 1,
														NETWORK_4G: 2,
														NETWORK_3G: 3,
														NETWORK_2G: 4,
														NETWORK_WIRE: 5
													}
												},
												CompressType: {
													values: {
														COMPRESS_NONE: 0,
														COMPRESS_ZLIB: 1
													}
												}
											}
										},
										MUCBody: {
											fields: {
												mucId: {
													type: "JID",
													id: 1
												},
												operation: {
													type: "Operation",
													id: 2
												},
												from: {
													type: "JID",
													id: 3
												},
												to: {
													rule: "repeated",
													type: "JID",
													id: 4
												},
												setting: {
													type: "Setting",
													id: 5
												},
												reason: {
													type: "string",
													id: 6
												},
												isChatroom: {
													type: "bool",
													id: 7
												},
												status: {
													type: "Status",
													id: 8
												}
											},
											nested: {
												Operation: {
													values: {
														CREATE: 0,
														DESTROY: 1,
														JOIN: 2,
														LEAVE: 3,
														APPLY: 4,
														APPLY_ACCEPT: 5,
														APPLY_DECLINE: 6,
														INVITE: 7,
														INVITE_ACCEPT: 8,
														INVITE_DECLINE: 9,
														KICK: 10,
														GET_BLACKLIST: 11,
														BAN: 12,
														ALLOW: 13,
														UPDATE: 14,
														BLOCK: 15,
														UNBLOCK: 16,
														PRESENCE: 17,
														ABSENCE: 18,
														DIRECT_JOINED: 19,
														ASSIGN_OWNER: 20,
														ADD_ADMIN: 21,
														REMOVE_ADMIN: 22,
														ADD_MUTE: 23,
														REMOVE_MUTE: 24,
														UPDATE_ANNOUNCEMENT: 25,
														DELETE_ANNOUNCEMENT: 26,
														UPLOAD_FILE: 27,
														DELETE_FILE: 28,
														ADD_USER_WHITE_LIST: 29,
														REMOVE_USER_WHITE_LIST: 30,
														BAN_GROUP: 31,
														REMOVE_BAN_GROUP: 32
													}
												},
												Setting: {
													fields: {
														name: {
															type: "string",
															id: 1
														},
														desc: {
															type: "string",
															id: 2
														},
														type: {
															type: "Type",
															id: 3
														},
														maxUsers: {
															type: "int32",
															id: 4
														},
														owner: {
															type: "string",
															id: 5
														}
													},
													nested: {
														Type: {
															values: {
																PRIVATE_OWNER_INVITE: 0,
																PRIVATE_MEMBER_INVITE: 1,
																PUBLIC_JOIN_APPROVAL: 2,
																PUBLIC_JOIN_OPEN: 3,
																PUBLIC_ANONYMOUS: 4
															}
														}
													}
												},
												Status: {
													fields: {
														errorCode: {
															type: "ErrorCode",
															id: 1
														},
														description: {
															type: "string",
															id: 2
														}
													},
													nested: {
														ErrorCode: {
															values: {
																OK: 0,
																PERMISSION_DENIED: 1,
																WRONG_PARAMETER: 2,
																MUC_NOT_EXIST: 3,
																USER_NOT_EXIST: 4,
																UNKNOWN: 5
															}
														}
													}
												}
											}
										},
										RosterBody: {
											fields: {
												operation: {
													type: "Operation",
													id: 1
												},
												status: {
													type: "Status",
													id: 2
												},
												from: {
													type: "JID",
													id: 3
												},
												to: {
													rule: "repeated",
													type: "JID",
													id: 4
												},
												reason: {
													type: "string",
													id: 5
												},
												rosterVer: {
													type: "string",
													id: 6
												},
												biDirection: {
													type: "bool",
													id: 7
												}
											},
											nested: {
												Operation: {
													values: {
														GET_ROSTER: 0,
														GET_BLACKLIST: 1,
														ADD: 2,
														REMOVE: 3,
														ACCEPT: 4,
														DECLINE: 5,
														BAN: 6,
														ALLOW: 7,
														REMOTE_ACCEPT: 8,
														REMOTE_DECLINE: 9
													}
												},
												Status: {
													fields: {
														errorCode: {
															type: "ErrorCode",
															id: 1
														},
														description: {
															type: "string",
															id: 2
														}
													},
													nested: {
														ErrorCode: {
															values: {
																OK: 0,
																USER_NOT_EXIST: 1,
																USER_ALREADY_FRIEND: 2,
																USER_ALREADY_BLACKLIST: 3
															}
														}
													}
												}
											}
										},
										StatisticsBody: {
											fields: {
												operation: {
													type: "Operation",
													id: 1
												},
												os: {
													type: "OsType",
													id: 2
												},
												version: {
													type: "string",
													id: 3
												},
												network: {
													type: "NetworkType",
													id: 4
												},
												imTime: {
													type: "uint32",
													id: 5
												},
												chatTime: {
													type: "uint32",
													id: 6
												},
												location: {
													type: "string",
													id: 7
												}
											},
											nested: {
												Operation: {
													values: {
														INFORMATION: 0,
														USER_REMOVED: 1,
														USER_LOGIN_ANOTHER_DEVICE: 2,
														USER_KICKED_BY_CHANGE_PASSWORD: 3,
														USER_KICKED_BY_OTHER_DEVICE: 4
													}
												},
												OsType: {
													values: {
														OS_IOS: 0,
														OS_ANDROID: 1,
														OS_LINUX: 2,
														OS_OSX: 3,
														OS_WIN: 4,
														OS_OTHER: 16
													}
												},
												NetworkType: {
													values: {
														NETWORK_NONE: 0,
														NETWORK_WIFI: 1,
														NETWORK_4G: 2,
														NETWORK_3G: 3,
														NETWORK_2G: 4,
														NETWORK_WIRE: 5
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			};
			t.default = o
		}, function(e, t, r) {
			"use strict";
			e.exports = i;
			var o = r(3);

			function i(e, t) {
				this.lo = e >>> 0, this.hi = t >>> 0
			}
			var n = i.zero = new i(0, 0);
			n.toNumber = function() {
				return 0
			}, n.zzEncode = n.zzDecode = function() {
				return this
			}, n.length = function() {
				return 1
			};
			var s = i.zeroHash = "\0\0\0\0\0\0\0\0";
			i.fromNumber = function(e) {
				if (0 === e) return n;
				var t = e < 0;
				t && (e = -e);
				var r = e >>> 0,
					o = (e - r) / 4294967296 >>> 0;
				return t && (o = ~o >>> 0, r = ~r >>> 0, ++r > 4294967295 && (r = 0, ++o >
					4294967295 && (o = 0))), new i(r, o)
			}, i.from = function(e) {
				if ("number" == typeof e) return i.fromNumber(e);
				if ("string" == typeof e || e instanceof String) {
					if (!o.Long) return i.fromNumber(parseInt(e, 10));
					e = o.Long.fromString(e)
				}
				return e.low || e.high ? new i(e.low >>> 0, e.high >>> 0) : n
			}, i.prototype.toNumber = function(e) {
				if (!e && this.hi >>> 31) {
					var t = 1 + ~this.lo >>> 0,
						r = ~this.hi >>> 0;
					return t || (r = r + 1 >>> 0), -(t + 4294967296 * r)
				}
				return this.lo + 4294967296 * this.hi
			}, i.prototype.toLong = function(e) {
				return o.Long ? new o.Long(0 | this.lo, 0 | this.hi, Boolean(e)) : {
					low: 0 | this.lo,
					high: 0 | this.hi,
					unsigned: Boolean(e)
				}
			};
			var a = String.prototype.charCodeAt;
			i.fromHash = function(e) {
				return e === s ? n : new i((a.call(e, 0) | a.call(e, 1) << 8 | a.call(e, 2) << 16 |
					a.call(e, 3) << 24) >>> 0, (a.call(e, 4) | a.call(e, 5) << 8 | a.call(e,
					6) << 16 | a.call(e, 7) << 24) >>> 0)
			}, i.prototype.toHash = function() {
				return String.fromCharCode(255 & this.lo, this.lo >>> 8 & 255, this.lo >>> 16 & 255,
					this.lo >>> 24, 255 & this.hi, this.hi >>> 8 & 255, this.hi >>> 16 & 255,
					this.hi >>> 24)
			}, i.prototype.zzEncode = function() {
				var e = this.hi >> 31;
				return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ e) >>> 0, this.lo = (this.lo <<
					1 ^ e) >>> 0, this
			}, i.prototype.zzDecode = function() {
				var e = -(1 & this.lo);
				return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ e) >>> 0, this.hi = (this.hi >>>
					1 ^ e) >>> 0, this
			}, i.prototype.length = function() {
				var e = this.lo,
					t = (this.lo >>> 28 | this.hi << 4) >>> 0,
					r = this.hi >>> 24;
				return 0 === r ? 0 === t ? e < 16384 ? e < 128 ? 1 : 2 : e < 2097152 ? 3 : 4 : t <
					16384 ? t < 128 ? 5 : 6 : t < 2097152 ? 7 : 8 : r < 128 ? 9 : 10
			}
		}, function(e, t, r) {
			"use strict";
			var o = r(0)(r(4));
			e.exports = a;
			var i, n, s = r(16);

			function a(e, t, r, o, i, a) {
				if (s.call(this, e, t, o, void 0, void 0, i, a), !n.isString(r)) throw TypeError(
					"keyType must be a string");
				this.keyType = r, this.resolvedKeyType = null, this.map = !0
			}((a.prototype = Object.create(s.prototype)).constructor = a).className = "MapField", a
				.fromJSON = function(e, t) {
					return new a(e, t.id, t.keyType, t.type, t.options, t.comment)
				}, a.prototype.toJSON = function(e) {
					var t = !!e && Boolean(e.keepComments);
					return n.toObject(["keyType", this.keyType, "type", this.type, "id", this.id,
						"extend", this.extend, "options", this.options, "comment", t ? this
						.comment : void 0
					])
				}, a.prototype.resolve = function() {
					if (this.resolved) return this;
					if (void 0 === i.mapKey[this.keyType]) throw Error("invalid key type: " + this
						.keyType);
					return s.prototype.resolve.call(this)
				}, a.d = function(e, t, r) {
					return "function" == typeof r ? r = n.decorateType(r).name : r && "object" === (0, o
							.default)(r) && (r = n.decorateEnum(r).name),
						function(o, i) {
							n.decorateType(o.constructor).add(new a(i, e, t, r))
						}
				}, a._configure = function() {
					i = r(24), n = r(3)
				}
		}, function(e, t, r) {
			"use strict";
			e.exports = n;
			var o, i = r(23);

			function n(e, t, r, n, s, a, u, l) {
				if (o.isObject(s) ? (u = s, s = a = void 0) : o.isObject(a) && (u = a, a = void 0),
					void 0 !== t && !o.isString(t)) throw TypeError("type must be a string");
				if (!o.isString(r)) throw TypeError("requestType must be a string");
				if (!o.isString(n)) throw TypeError("responseType must be a string");
				i.call(this, e, u), this.type = t || "rpc", this.requestType = r, this.requestStream = !
					!s || void 0, this.responseType = n, this.responseStream = !!a || void 0, this
					.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l
			}((n.prototype = Object.create(i.prototype)).constructor = n).className = "Method", n
				.fromJSON = function(e, t) {
					return new n(e, t.type, t.requestType, t.responseType, t.requestStream, t
						.responseStream, t.options, t.comment)
				}, n.prototype.toJSON = function(e) {
					var t = !!e && Boolean(e.keepComments);
					return o.toObject(["type", "rpc" !== this.type && this.type || void 0,
						"requestType", this.requestType, "requestStream", this.requestStream,
						"responseType", this.responseType, "responseStream", this
						.responseStream, "options", this.options, "comment", t ? this.comment :
						void 0
					])
				}, n.prototype.resolve = function() {
					return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(
						this.requestType), this.resolvedResponseType = this.parent.lookupType(
						this.responseType), i.prototype.resolve.call(this))
				}, n._configure = function() {
					o = r(3)
				}
		}, function(e, t, r) {
			"use strict";
			var o;

			function i(e) {
				if (e)
					for (var t = Object.keys(e), r = 0; r < t.length; ++r) this[t[r]] = e[t[r]]
			}
			e.exports = i, i.create = function(e) {
				return this.$type.create(e)
			}, i.encode = function(e, t) {
				return arguments.length ? 1 == arguments.length ? this.$type.encode(arguments[0]) :
					this.$type.encode(arguments[0], arguments[1]) : this.$type.encode(this)
			}, i.encodeDelimited = function(e, t) {
				return this.$type.encodeDelimited(e, t)
			}, i.decode = function(e) {
				return this.$type.decode(e)
			}, i.decodeDelimited = function(e) {
				return this.$type.decodeDelimited(e)
			}, i.verify = function(e) {
				return this.$type.verify(e)
			}, i.fromObject = function(e) {
				return this.$type.fromObject(e)
			}, i.toObject = function(e, t) {
				return e = e || this, this.$type.toObject(e, t)
			}, i.prototype.toJSON = function() {
				return this.$type.toObject(this, o.toJSONOptions)
			}, i.set = function(e, t) {
				i[e] = t
			}, i.get = function(e) {
				return i[e]
			}, i._configure = function() {
				o = r(3)
			}
		}, , , , , , , , , , , , , , , , , , , , , , , , , function(e, t, r) {
			"use strict";
			e.exports = l;
			var o, i = r(3),
				n = r(39);

			function s(e, t, r) {
				this.fn = e, this.len = t, this.next = void 0, this.val = r
			}

			function a() {}

			function u(e) {
				this.head = e.head, this.tail = e.tail, this.len = e.len, this.next = e.states
			}

			function l() {
				this.len = 0, this.head = new s(a, 0, 0), this.tail = this.head, this.states = null
			}

			function c(e, t, r) {
				t[r] = 255 & e
			}

			function p(e, t) {
				this.len = e, this.next = void 0, this.val = t
			}

			function h(e, t, r) {
				for (; e.hi;) t[r++] = 127 & e.lo | 128, e.lo = (e.lo >>> 7 | e.hi << 25) >>> 0, e
					.hi >>>= 7;
				for (; e.lo > 127;) t[r++] = 127 & e.lo | 128, e.lo = e.lo >>> 7;
				t[r++] = e.lo
			}

			function d(e, t, r) {
				t[r] = 255 & e, t[r + 1] = e >>> 8 & 255, t[r + 2] = e >>> 16 & 255, t[r + 3] = e >>> 24
			}
			l.create = i.Buffer ? function() {
					return (l.create = function() {
						return new(void 0)
					})()
				} : function() {
					return new l
				}, l.alloc = function(e) {
					return new i.Array(e)
				}, i.Array !== Array && (l.alloc = i.pool(l.alloc, i.Array.prototype.subarray)), l
				.prototype._push = function(e, t, r) {
					return this.tail = this.tail.next = new s(e, t, r), this.len += t, this
				}, p.prototype = Object.create(s.prototype), p.prototype.fn = function(e, t, r) {
					for (; e > 127;) t[r++] = 127 & e | 128, e >>>= 7;
					t[r] = e
				}, l.prototype.uint32 = function(e) {
					return this.len += (this.tail = this.tail.next = new p((e >>>= 0) < 128 ? 1 : e <
						16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5, e)).len, this
				}, l.prototype.int32 = function(e) {
					return e < 0 ? this._push(h, 10, o.fromNumber(e)) : this.uint32(e)
				}, l.prototype.sint32 = function(e) {
					return this.uint32((e << 1 ^ e >> 31) >>> 0)
				}, l.prototype.uint64 = function(e) {
					var t = o.from(e);
					return this._push(h, t.length(), t)
				}, l.prototype.int64 = l.prototype.uint64, l.prototype.sint64 = function(e) {
					var t = o.from(e).zzEncode();
					return this._push(h, t.length(), t)
				}, l.prototype.bool = function(e) {
					return this._push(c, 1, e ? 1 : 0)
				}, l.prototype.fixed32 = function(e) {
					return this._push(d, 4, e >>> 0)
				}, l.prototype.sfixed32 = l.prototype.fixed32, l.prototype.fixed64 = function(e) {
					var t = o.from(e);
					return this._push(d, 4, t.lo)._push(d, 4, t.hi)
				}, l.prototype.sfixed64 = l.prototype.fixed64, l.prototype.float = function(e) {
					return this._push(i.float.writeFloatLE, 4, e)
				}, l.prototype.double = function(e) {
					return this._push(i.float.writeDoubleLE, 8, e)
				};
			var f = i.Array.prototype.set ? function(e, t, r) {
				t.set(e, r)
			} : function(e, t, r) {
				for (var o = 0; o < e.length; ++o) t[r + o] = e[o]
			};
			l.prototype.bytes = function(e) {
				var t = e.length >>> 0;
				if (!t) return this._push(c, 1, 0);
				if (i.isString(e)) {
					var r = l.alloc(t = n.length(e));
					n.write(e, r, 0), e = r
				}
				return this.uint32(t)._push(f, t, e)
			}, l.prototype.string = function(e) {
				var t = n.length(e);
				return t ? this.uint32(t)._push(n.write, t, e) : this._push(c, 1, 0)
			}, l.prototype.fork = function() {
				return this.states = new u(this), this.head = this.tail = new s(a, 0, 0), this.len =
					0, this
			}, l.prototype.reset = function() {
				return this.states ? (this.head = this.states.head, this.tail = this.states.tail,
					this.len = this.states.len, this.states = this.states.next) : (this.head =
					this.tail = new s(a, 0, 0), this.len = 0), this
			}, l.prototype.ldelim = function() {
				var e = this.head,
					t = this.tail,
					r = this.len;
				return this.reset().uint32(r), r && (this.tail.next = e.next, this.tail = t, this
					.len += r), this
			}, l.prototype.finish = function() {
				for (var e = this.head.next, t = this.constructor.alloc(this.len), r = 0; e;) e.fn(e
					.val, t, r), r += e.len, e = e.next;
				return t
			}, l._configure = function() {
				o = r(66), r(96), n = r(39)
			}
		}, function(e, t, r) {
			"use strict";
			e.exports = {}
		}, function(e, t, r) {
			"use strict";
			var o = e.exports;
			o.length = function(e) {
				var t = e.length;
				if (!t) return 0;
				for (var r = 0; --t % 4 > 1 && "=" === e.charAt(t);) ++r;
				return Math.ceil(3 * e.length) / 4 - r
			};
			for (var i = new Array(64), n = new Array(123), s = 0; s < 64;) n[i[s] = s < 26 ? s + 65 :
				s < 52 ? s + 71 : s < 62 ? s - 4 : s - 59 | 43] = s++;
			o.encode = function(e, t, r) {
				for (var o, n = null, s = [], a = 0, u = 0; t < r;) {
					var l = e[t++];
					switch (u) {
						case 0:
							s[a++] = i[l >> 2], o = (3 & l) << 4, u = 1;
							break;
						case 1:
							s[a++] = i[o | l >> 4], o = (15 & l) << 2, u = 2;
							break;
						case 2:
							s[a++] = i[o | l >> 6], s[a++] = i[63 & l], u = 0
					}
					a > 8191 && ((n || (n = [])).push(String.fromCharCode.apply(String, s)), a = 0)
				}
				return u && (s[a++] = i[o], s[a++] = 61, 1 === u && (s[a++] = 61)), n ? (a && n
						.push(String.fromCharCode.apply(String, s.slice(0, a))), n.join("")) :
					String.fromCharCode.apply(String, s.slice(0, a))
			};
			o.decode = function(e, t, r) {
				for (var o, i = r, s = 0, a = 0; a < e.length;) {
					var u = e.charCodeAt(a++);
					if (61 === u && s > 1) break;
					if (void 0 === (u = n[u])) throw Error("invalid encoding");
					switch (s) {
						case 0:
							o = u, s = 1;
							break;
						case 1:
							t[r++] = o << 2 | (48 & u) >> 4, o = u, s = 2;
							break;
						case 2:
							t[r++] = (15 & o) << 4 | (60 & u) >> 2, o = u, s = 3;
							break;
						case 3:
							t[r++] = (3 & o) << 6 | u, s = 0
					}
				}
				if (1 === s) throw Error("invalid encoding");
				return r - i
			}, o.test = function(e) {
				return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)
			}
		}, function(e, t, r) {
			"use strict";
			var o, i, n, s, a, u, l, c, p, h, d;
			e.exports = T, T.filename = null, T.defaults = {
				keepCase: !1
			};
			var f = /^[1-9][0-9]*$/,
				y = /^-?[1-9][0-9]*$/,
				m = /^0[x][0-9a-fA-F]+$/,
				g = /^-?0[x][0-9a-fA-F]+$/,
				v = /^0[0-7]+$/,
				_ = /^-?0[0-7]+$/,
				N = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,
				E = /^[a-zA-Z_][a-zA-Z_0-9]*$/,
				O = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,
				b = /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/;

			function T(e, t, r) {
				t instanceof i || (r = t, t = new i), r || (r = T.defaults);
				var I, C, R, S, w, A = o(e, r.alternateCommentMode || !1),
					k = A.next,
					x = A.push,
					j = A.peek,
					M = A.skip,
					U = A.cmnt,
					B = !0,
					L = !1,
					D = t,
					P = r.keepCase ? function(e) {
						return e
					} : d.camelCase;

				function F(e, t, r) {
					var o = T.filename;
					return r || (T.filename = null), Error("illegal " + (t || "token") + " '" + e +
						"' (" + (o ? o + ", " : "") + "line " + A.line + ")")
				}

				function W() {
					var e, t = [];
					do {
						if ('"' !== (e = k()) && "'" !== e) throw F(e);
						t.push(k()), M(e), e = j()
					} while ('"' === e || "'" === e);
					return t.join("")
				}

				function G(e) {
					var t = k();
					switch (t) {
						case "'":
						case '"':
							return x(t), W();
						case "true":
						case "TRUE":
							return !0;
						case "false":
						case "FALSE":
							return !1
					}
					try {
						return function(e, t) {
							var r = 1;
							"-" === e.charAt(0) && (r = -1, e = e.substring(1));
							switch (e) {
								case "inf":
								case "INF":
								case "Inf":
									return r * (1 / 0);
								case "nan":
								case "NAN":
								case "Nan":
								case "NaN":
									return NaN;
								case "0":
									return 0
							}
							if (f.test(e)) return r * parseInt(e, 10);
							if (m.test(e)) return r * parseInt(e, 16);
							if (v.test(e)) return r * parseInt(e, 8);
							if (N.test(e)) return r * parseFloat(e);
							throw F(e, "number", t)
						}(t, !0)
					} catch (r) {
						if (e && O.test(t)) return t;
						throw F(t, "value")
					}
				}

				function q(e, t) {
					var r, o;
					do {
						!t || '"' !== (r = j()) && "'" !== r ? e.push([o = z(k()), M("to", !0) ? z(
						k()) : o
						]) : e.push(W())
					} while (M(",", !0));
					M(";")
				}

				function z(e, t) {
					switch (e) {
						case "max":
						case "MAX":
						case "Max":
							return 536870911;
						case "0":
							return 0
					}
					if (!t && "-" === e.charAt(0)) throw F(e, "id");
					if (y.test(e)) return parseInt(e, 10);
					if (g.test(e)) return parseInt(e, 16);
					if (_.test(e)) return parseInt(e, 8);
					throw F(e, "id")
				}

				function K() {
					if (void 0 !== I) throw F("package");
					if (I = k(), !O.test(I)) throw F(I, "name");
					D = D.define(I), M(";")
				}

				function H() {
					var e, t = j();
					switch (t) {
						case "weak":
							e = R || (R = []), k();
							break;
						case "public":
							k();
						default:
							e = C || (C = [])
					}
					t = W(), M(";"), e.push(t)
				}

				function V() {
					if (M("="), S = W(), !(L = "proto3" === S) && "proto2" !== S) throw F(S, "syntax");
					M(";")
				}

				function J(e, t) {
					switch (t) {
						case "option":
							return Y(e, t), M(";"), !0;
						case "message":
							return function(e, t) {
								if (!E.test(t = k())) throw F(t, "type name");
								var r = new n(t);
								$(r, (function(e) {
									if (!J(r, e)) switch (e) {
										case "map":
											! function(e) {
												M("<");
												var t = k();
												if (void 0 === h.mapKey[t]) throw F(
													t, "type");
												M(",");
												var r = k();
												if (!O.test(r)) throw F(r, "type");
												M(">");
												var o = k();
												if (!E.test(o)) throw F(o, "name");
												M("=");
												var i = new a(P(o), z(k()), t, r);
												$(i, (function(e) {
													if ("option" !== e)
														throw F(e);
													Y(i, e), M(";")
												}), (function() {
													ee(i)
												})), e.add(i)
											}(r);
											break;
										case "required":
										case "optional":
										case "repeated":
											Z(r, e);
											break;
										case "oneof":
											! function(e, t) {
												if (!E.test(t = k())) throw F(t,
													"name");
												var r = new u(P(t));
												$(r, (function(e) {
													"option" === e ? (Y(
															r, e),
														M(";")) : (
														x(e), Z(r,
															"optional"
															))
												})), e.add(r)
											}(r, e);
											break;
										case "extensions":
											q(r.extensions || (r.extensions = []));
											break;
										case "reserved":
											q(r.reserved || (r.reserved = []), !0);
											break;
										default:
											if (!L || !O.test(e)) throw F(e);
											x(e), Z(r, "optional")
									}
								})), e.add(r)
							}(e, t), !0;
						case "enum":
							return function(e, t) {
								if (!E.test(t = k())) throw F(t, "name");
								var r = new l(t);
								$(r, (function(e) {
									switch (e) {
										case "option":
											Y(r, e), M(";");
											break;
										case "reserved":
											q(r.reserved || (r.reserved = []), !0);
											break;
										default:
											! function(e, t) {
												if (!E.test(t)) throw F(t, "name");
												M("=");
												var r = z(k(), !0),
													o = {};
												$(o, (function(e) {
													if ("option" !== e)
														throw F(e);
													Y(o, e), M(";")
												}), (function() {
													ee(o)
												})), e.add(t, r, o.comment)
											}(r, e)
									}
								})), e.add(r)
							}(e, t), !0;
						case "service":
							return function(e, t) {
								if (!E.test(t = k())) throw F(t, "service name");
								var r = new c(t);
								$(r, (function(e) {
									if (!J(r, e)) {
										if ("rpc" !== e) throw F(e);
										! function(e, t) {
											var r = t;
											if (!E.test(t = k())) throw F(t, "name");
											var o, i, n, s, a = t;
											M("("), M("stream", !0) && (i = !0);
											if (!O.test(t = k())) throw F(t);
											o = t, M(")"), M("returns"), M("("), M(
												"stream", !0) && (s = !0);
											if (!O.test(t = k())) throw F(t);
											n = t, M(")");
											var u = new p(a, r, o, n, i, s);
											$(u, (function(e) {
												if ("option" !== e) throw F(
													e);
												Y(u, e), M(";")
											})), e.add(u)
										}(r, e)
									}
								})), e.add(r)
							}(e, t), !0;
						case "extend":
							return function(e, t) {
								if (!O.test(t = k())) throw F(t, "reference");
								var r = t;
								$(null, (function(t) {
									switch (t) {
										case "required":
										case "repeated":
										case "optional":
											Z(e, t, r);
											break;
										default:
											if (!L || !O.test(t)) throw F(t);
											x(t), Z(e, "optional", r)
									}
								}))
							}(e, t), !0
					}
					return !1
				}

				function $(e, t, r) {
					var o = A.line;
					if (e && (e.comment = U(), e.filename = T.filename), M("{", !0)) {
						for (var i;
							"}" !== (i = k());) t(i);
						M(";", !0)
					} else r && r(), M(";"), e && "string" != typeof e.comment && (e.comment = U(o))
				}

				function Z(e, t, r) {
					var o = k();
					if ("group" !== o) {
						if (!O.test(o)) throw F(o, "type");
						var i = k();
						if (!E.test(i)) throw F(i, "name");
						i = P(i), M("=");
						var a = new s(i, z(k()), o, t, r);
						$(a, (function(e) {
								if ("option" !== e) throw F(e);
								Y(a, e), M(";")
							}), (function() {
								ee(a)
							})), e.add(a), L || !a.repeated || void 0 === h.packed[o] && void 0 !== h
							.basic[o] || a.setOption("packed", !1, !0)
					} else ! function(e, t) {
						var r = k();
						if (!E.test(r)) throw F(r, "name");
						var o = d.lcFirst(r);
						r === o && (r = d.ucFirst(r));
						M("=");
						var i = z(k()),
							a = new n(r);
						a.group = !0;
						var u = new s(o, i, r, t);
						u.filename = T.filename, $(a, (function(e) {
							switch (e) {
								case "option":
									Y(a, e), M(";");
									break;
								case "required":
								case "optional":
								case "repeated":
									Z(a, e);
									break;
								default:
									throw F(e)
							}
						})), e.add(a).add(u)
					}(e, t)
				}

				function Y(e, t) {
					var r = M("(", !0);
					if (!O.test(t = k())) throw F(t, "name");
					var o = t;
					r && (M(")"), o = "(" + o + ")", t = j(), b.test(t) && (o += t, k())), M("="), X(e,
						o)
				}

				function X(e, t) {
					if (M("{", !0))
						do {
							if (!E.test(w = k())) throw F(w, "name");
							"{" === j() ? X(e, t + "." + w) : (M(":"), "{" === j() ? X(e, t + "." + w) :
								Q(e, t + "." + w, G(!0)))
						} while (!M("}", !0));
					else Q(e, t, G(!0))
				}

				function Q(e, t, r) {
					e.setOption && e.setOption(t, r)
				}

				function ee(e) {
					if (M("[", !0)) {
						do {
							Y(e, "option")
						} while (M(",", !0));
						M("]")
					}
					return e
				}
				for (; null !== (w = k());) switch (w) {
					case "package":
						if (!B) throw F(w);
						K();
						break;
					case "import":
						if (!B) throw F(w);
						H();
						break;
					case "syntax":
						if (!B) throw F(w);
						V();
						break;
					case "option":
						if (!B) throw F(w);
						Y(D, w), M(";");
						break;
					default:
						if (J(D, w)) {
							B = !1;
							continue
						}
						throw F(w)
				}
				return T.filename = null, {
					package: I,
					imports: C,
					weakImports: R,
					syntax: S,
					root: t
				}
			}
			T._configure = function() {
				o = r(98), i = r(40), n = r(22), s = r(16), a = r(67), u = r(34), l = r(10), c = r(
					41), p = r(68), h = r(24), d = r(3)
			}
		}, function(e, t, r) {
			"use strict";
			e.exports = d;
			var o = /[\s{}=;:[\],'"()<>]/g,
				i = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,
				n = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,
				s = /^ *[*/]+ */,
				a = /^\s*\*?\/*/,
				u = /\n/g,
				l = /\s/,
				c = /\\(.?)/g,
				p = {
					0: "\0",
					r: "\r",
					n: "\n",
					t: "\t"
				};

			function h(e) {
				return e.replace(c, (function(e, t) {
					switch (t) {
						case "\\":
						case "":
							return t;
						default:
							return p[t] || ""
					}
				}))
			}

			function d(e, t) {
				e = e.toString();
				var r = 0,
					c = e.length,
					p = 1,
					d = null,
					f = null,
					y = 0,
					m = !1,
					g = [],
					v = null;

				function _(e) {
					return Error("illegal " + e + " (line " + p + ")")
				}

				function N(t) {
					return e.charAt(t)
				}

				function E(r, o) {
					d = e.charAt(r++), y = p, m = !1;
					var i, n = r - (t ? 2 : 3);
					do {
						if (--n < 0 || "\n" === (i = e.charAt(n))) {
							m = !0;
							break
						}
					} while (" " === i || "\t" === i);
					for (var l = e.substring(r, o).split(u), c = 0; c < l.length; ++c) l[c] = l[c]
						.replace(t ? a : s, "").trim();
					f = l.join("\n").trim()
				}

				function O(t) {
					var r = b(t),
						o = e.substring(t, r);
					return /^\s*\/{1,2}/.test(o)
				}

				function b(e) {
					for (var t = e; t < c && "\n" !== N(t);) t++;
					return t
				}

				function T() {
					if (g.length > 0) return g.shift();
					if (v) return function() {
						var t = "'" === v ? n : i;
						t.lastIndex = r - 1;
						var o = t.exec(e);
						if (!o) throw _("string");
						return r = t.lastIndex, I(v), v = null, h(o[1])
					}();
					var s, a, u, d, f;
					do {
						if (r === c) return null;
						for (s = !1; l.test(u = N(r));)
							if ("\n" === u && ++p, ++r === c) return null;
						if ("/" === N(r)) {
							if (++r === c) throw _("comment");
							if ("/" === N(r))
								if (t) {
									if (d = r, f = !1, O(r)) {
										f = !0;
										do {
											if ((r = b(r)) === c) break;
											r++
										} while (O(r))
									} else r = Math.min(c, b(r) + 1);
									f && E(d, r), p++, s = !0
								} else {
									for (f = "/" === N(d = r + 1);
										"\n" !== N(++r);)
										if (r === c) return null;
									++r, f && E(d, r - 1), ++p, s = !0
								}
							else {
								if ("*" !== (u = N(r))) return "/";
								d = r + 1, f = t || "*" === N(d);
								do {
									if ("\n" === u && ++p, ++r === c) throw _("comment");
									a = u, u = N(r)
								} while ("*" !== a || "/" !== u);
								++r, f && E(d, r - 2), s = !0
							}
						}
					} while (s);
					var y = r;
					if (o.lastIndex = 0, !o.test(N(y++)))
						for (; y < c && !o.test(N(y));) ++y;
					var m = e.substring(r, r = y);
					return '"' !== m && "'" !== m || (v = m), m
				}

				function I(e) {
					g.push(e)
				}

				function C() {
					if (!g.length) {
						var e = T();
						if (null === e) return null;
						I(e)
					}
					return g[0]
				}
				return Object.defineProperty({
					next: T,
					peek: C,
					push: I,
					skip: function(e, t) {
						var r = C();
						if (r === e) return T(), !0;
						if (!t) throw _("token '" + r + "', '" + e + "' expected");
						return !1
					},
					cmnt: function(e) {
						var r = null;
						return void 0 === e ? y === p - 1 && (t || "*" === d || m) && (r =
							f) : (y < e && C(), y !== e || m || !t && "/" !== d || (r =
							f)), r
					}
				}, "line", {
					get: function() {
						return p
					}
				})
			}
			d.unescape = h
		}, function(e, t, r) {
			"use strict";
			e.exports = i;
			var o = r(3);

			function i(e, t, r) {
				if ("function" != typeof e) throw TypeError("rpcImpl must be a function");
				o.EventEmitter.call(this), this.rpcImpl = e, this.requestDelimited = Boolean(t), this
					.responseDelimited = Boolean(r)
			}(i.prototype = Object.create(o.EventEmitter.prototype)).constructor = i, i.prototype
				.rpcCall = function e(t, r, i, n, s) {
					if (!n) throw TypeError("request must be specified");
					var a = this;
					if (!s) return o.asPromise(e, a, t, r, i, n);
					if (a.rpcImpl) try {
						return a.rpcImpl(t, r[a.requestDelimited ? "encodeDelimited" : "encode"](n)
							.finish(), (function(e, r) {
								if (e) return a.emit("error", e, t), s(e);
								if (null !== r) {
									if (!(r instanceof i)) try {
										r = i[a.responseDelimited ? "decodeDelimited" :
											"decode"](r)
									} catch (e) {
										return a.emit("error", e, t), s(e)
									}
									return a.emit("data", r, t), s(null, r)
								}
								a.end(!0)
							}))
					} catch (e) {
						return a.emit("error", e, t), void setTimeout((function() {
							s(e)
						}), 0)
					} else setTimeout((function() {
						s(Error("already ended"))
					}), 0)
				}, i.prototype.end = function(e) {
					return this.rpcImpl && (e || this.rpcImpl(null, null, null), this.rpcImpl = null,
						this.emit("end").off()), this
				}
		}, function(e, t, r) {
			"use strict";
			e.exports = n;
			var o, i = /\/|\./;

			function n(e, t) {
				i.test(e) || (e = "google/protobuf/" + e + ".proto", t = {
					nested: {
						google: {
							nested: {
								protobuf: {
									nested: t
								}
							}
						}
					}
				}), n[e] = t
			}
			n("any", {
				Any: {
					fields: {
						type_url: {
							type: "string",
							id: 1
						},
						value: {
							type: "bytes",
							id: 2
						}
					}
				}
			}), n("duration", {
				Duration: o = {
					fields: {
						seconds: {
							type: "int64",
							id: 1
						},
						nanos: {
							type: "int32",
							id: 2
						}
					}
				}
			}), n("timestamp", {
				Timestamp: o
			}), n("empty", {
				Empty: {
					fields: {}
				}
			}), n("struct", {
				Struct: {
					fields: {
						fields: {
							keyType: "string",
							type: "Value",
							id: 1
						}
					}
				},
				Value: {
					oneofs: {
						kind: {
							oneof: ["nullValue", "numberValue", "stringValue", "boolValue",
								"structValue", "listValue"
							]
						}
					},
					fields: {
						nullValue: {
							type: "NullValue",
							id: 1
						},
						numberValue: {
							type: "double",
							id: 2
						},
						stringValue: {
							type: "string",
							id: 3
						},
						boolValue: {
							type: "bool",
							id: 4
						},
						structValue: {
							type: "Struct",
							id: 5
						},
						listValue: {
							type: "ListValue",
							id: 6
						}
					}
				},
				NullValue: {
					values: {
						NULL_VALUE: 0
					}
				},
				ListValue: {
					fields: {
						values: {
							rule: "repeated",
							type: "Value",
							id: 1
						}
					}
				}
			}), n("wrappers", {
				DoubleValue: {
					fields: {
						value: {
							type: "double",
							id: 1
						}
					}
				},
				FloatValue: {
					fields: {
						value: {
							type: "float",
							id: 1
						}
					}
				},
				Int64Value: {
					fields: {
						value: {
							type: "int64",
							id: 1
						}
					}
				},
				UInt64Value: {
					fields: {
						value: {
							type: "uint64",
							id: 1
						}
					}
				},
				Int32Value: {
					fields: {
						value: {
							type: "int32",
							id: 1
						}
					}
				},
				UInt32Value: {
					fields: {
						value: {
							type: "uint32",
							id: 1
						}
					}
				},
				BoolValue: {
					fields: {
						value: {
							type: "bool",
							id: 1
						}
					}
				},
				StringValue: {
					fields: {
						value: {
							type: "string",
							id: 1
						}
					}
				},
				BytesValue: {
					fields: {
						value: {
							type: "bytes",
							id: 1
						}
					}
				}
			}), n("field_mask", {
				FieldMask: {
					fields: {
						paths: {
							rule: "repeated",
							type: "string",
							id: 1
						}
					}
				}
			}), n.get = function(e) {
				return n[e] || null
			}
		}, function(e, t, r) {
			"use strict";
			e.exports = a;
			var o, i, n = r(3);

			function s(e, t) {
				return RangeError("index out of range: " + e.pos + " + " + (t || 1) + " > " + e.len)
			}

			function a(e) {
				this.buf = e, this.pos = 0, this.len = e.length
			}
			var u, l = "undefined" != typeof Uint8Array ? function(e) {
				return e instanceof Uint8Array || Array.isArray(e) ? new a(e) : ("undefined" !=
					typeof ArrayBuffer && e instanceof ArrayBuffer && console.warn(""), new a(
						new Uint8Array(e)))
			} : function(e) {
				if (Array.isArray(e)) return new a(e)
			};

			function c() {
				var e = new o(0, 0),
					t = 0;
				if (!(this.len - this.pos > 4)) {
					for (; t < 3; ++t) {
						if (this.pos >= this.len) throw s(this);
						if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0, this.buf[this
								.pos++] < 128) return e
					}
					return e.lo = (e.lo | (127 & this.buf[this.pos++]) << 7 * t) >>> 0, e
				}
				for (; t < 4; ++t)
					if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0, this.buf[this
						.pos++] < 128) return e;
				if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 28) >>> 0, e.hi = (e.hi | (127 & this
						.buf[this.pos]) >> 4) >>> 0, this.buf[this.pos++] < 128) return e;
				if (t = 0, this.len - this.pos > 4) {
					for (; t < 5; ++t)
						if (e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0, this.buf[this
								.pos++] < 128) return e
				} else
					for (; t < 5; ++t) {
						if (this.pos >= this.len) throw s(this);
						if (e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0, this.buf[this
								.pos++] < 128) return e
					}
				throw Error("invalid varint encoding")
			}

			function p(e, t) {
				return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0
			}

			function h() {
				if (this.pos + 8 > this.len) throw s(this, 8);
				return new o(p(this.buf, this.pos += 4), p(this.buf, this.pos += 4))
			}
			a.create = n.Buffer ? function(e) {
					return (a.create = function(e) {
						return n.Buffer.isBuffer(e) ? new(void 0)(e) : l(e)
					})(e)
				} : l, a.prototype._slice = n.Array.prototype.subarray || n.Array.prototype.slice, a
				.prototype.uint32 = (u = 4294967295, function() {
					if (u = (127 & this.buf[this.pos]) >>> 0, this.buf[this.pos++] < 128) return u;
					if (u = (u | (127 & this.buf[this.pos]) << 7) >>> 0, this.buf[this.pos++] < 128)
						return u;
					if (u = (u | (127 & this.buf[this.pos]) << 14) >>> 0, this.buf[this.pos++] <
						128) return u;
					if (u = (u | (127 & this.buf[this.pos]) << 21) >>> 0, this.buf[this.pos++] <
						128) return u;
					if (u = (u | (15 & this.buf[this.pos]) << 28) >>> 0, this.buf[this.pos++] < 128)
						return u;
					if ((this.pos += 5) > this.len) throw this.pos = this.len, s(this, 10);
					return u
				}), a.prototype.int32 = function() {
					return 0 | this.uint32()
				}, a.prototype.sint32 = function() {
					var e = this.uint32();
					return e >>> 1 ^ -(1 & e) | 0
				}, a.prototype.bool = function() {
					return 0 !== this.uint32()
				}, a.prototype.fixed32 = function() {
					if (this.pos + 4 > this.len) throw s(this, 4);
					return p(this.buf, this.pos += 4)
				}, a.prototype.sfixed32 = function() {
					if (this.pos + 4 > this.len) throw s(this, 4);
					return 0 | p(this.buf, this.pos += 4)
				}, a.prototype.float = function() {
					if (this.pos + 4 > this.len) throw s(this, 4);
					var e = n.float.readFloatLE(this.buf, this.pos);
					return this.pos += 4, e
				}, a.prototype.double = function() {
					if (this.pos + 8 > this.len) throw s(this, 4);
					var e = n.float.readDoubleLE(this.buf, this.pos);
					return this.pos += 8, e
				}, a.prototype.bytes = function() {
					var e = this.uint32(),
						t = this.pos,
						r = this.pos + e;
					if (r > this.len) throw s(this, e);
					return this.pos += e, Array.isArray(this.buf) ? this.buf.slice(t, r) : t === r ?
						new this.buf.constructor(0) : this._slice.call(this.buf, t, r)
				}, a.prototype.string = function() {
					var e = this.bytes();
					return i.read(e, 0, e.length)
				}, a.prototype.skip = function(e) {
					if ("number" == typeof e) {
						if (this.pos + e > this.len) throw s(this, e);
						this.pos += e
					} else
						do {
							if (this.pos >= this.len) throw s(this)
						} while (128 & this.buf[this.pos++]);
					return this
				}, a.prototype.skipType = function(e) {
					switch (e) {
						case 0:
							this.skip();
							break;
						case 1:
							this.skip(8);
							break;
						case 2:
							this.skip(this.uint32());
							break;
						case 3:
							for (;;) {
								if (4 == (e = 7 & this.uint32())) break;
								this.skipType(e)
							}
							break;
						case 5:
							this.skip(4);
							break;
						default:
							throw Error("invalid wire type " + e + " at offset " + this.pos)
					}
					return this
				}, a._configure = function() {
					o = r(66), i = r(39);
					var e = n.Long ? "toLong" : "toNumber";
					n.merge(a.prototype, {
						int64: function() {
							return c.call(this)[e](!1)
						},
						uint64: function() {
							return c.call(this)[e](!0)
						},
						sint64: function() {
							return c.call(this).zzDecode()[e](!1)
						},
						fixed64: function() {
							return h.call(this)[e](!0)
						},
						sfixed64: function() {
							return h.call(this)[e](!1)
						}
					})
				}
		}, function(e, t, r) {
			"use strict";
			var o, i, n = r(0)(r(4));

			function s(e, t) {
				return e.name + ": " + t + (e.repeated && "array" !== t ? "[]" : e.map && "object" !==
					t ? "{k:" + e.keyType + "}" : "") + " expected"
			}

			function a(e, t, r, n) {
				var a = n.types;
				if (e.resolvedType)
					if (e.resolvedType instanceof o) {
						if (Object.keys(e.resolvedType.values).indexOf(r) < 0) return s(e, "enum value")
					} else {
						var u = a[t].verify(r);
						if (u) return e.name + "." + u
					}
				else switch (e.type) {
					case "int32":
					case "uint32":
					case "sint32":
					case "fixed32":
					case "sfixed32":
						if (!i.isInteger(r)) return s(e, "integer");
						break;
					case "int64":
					case "uint64":
					case "sint64":
					case "fixed64":
					case "sfixed64":
						if (!(i.isInteger(r) || r && i.isInteger(r.low) && i.isInteger(r.high)))
							return s(e, "integer|Long");
						break;
					case "float":
					case "double":
						if ("number" != typeof r) return s(e, "number");
						break;
					case "bool":
						if ("boolean" != typeof r) return s(e, "boolean");
						break;
					case "string":
						if (!i.isString(r)) return s(e, "string");
						break;
					case "bytes":
						if (!(r && "number" == typeof r.length || i.isString(r))) return s(e,
							"buffer")
				}
			}

			function u(e, t) {
				switch (e.keyType) {
					case "int32":
					case "uint32":
					case "sint32":
					case "fixed32":
					case "sfixed32":
						if (!i.key32Re.test(t)) return s(e, "integer key");
						break;
					case "int64":
					case "uint64":
					case "sint64":
					case "fixed64":
					case "sfixed64":
						if (!i.key64Re.test(t)) return s(e, "integer|Long key");
						break;
					case "bool":
						if (!i.key2Re.test(t)) return s(e, "boolean key")
				}
			}

			function l(e) {
				return function(t) {
					return function(r) {
						var o;
						if ("object" !== (0, n.default)(r) || null === r)
						return "object expected";
						var l, c = {};
						e.oneofsArray.length && (l = {});
						for (var p = 0; p < e.fieldsArray.length; ++p) {
							var h, d = e._fieldsArray[p].resolve(),
								f = r[d.name];
							if (!d.optional || null != f && r.hasOwnProperty(d.name))
								if (d.map) {
									if (!i.isObject(f)) return s(d, "object");
									var y = Object.keys(f);
									for (h = 0; h < y.length; ++h) {
										if (o = u(d, y[h])) return o;
										if (o = a(d, p, f[y[h]], t)) return o
									}
								} else if (d.repeated) {
								if (!Array.isArray(f)) return s(d, "array");
								for (h = 0; h < f.length; ++h)
									if (o = a(d, p, f[h], t)) return o
							} else {
								if (d.partOf) {
									var m = d.partOf.name;
									if (1 === c[d.partOf.name] && 1 === l[m]) return d.partOf
										.name + ": multiple values";
									l[m] = 1
								}
								if (o = a(d, p, f, t)) return o
							}
						}
					}
				}
			}
			e.exports = l, l._configure = function() {
				o = r(10), i = r(3)
			}
		}, function(e, t, r) {
			"use strict";
			var o, i;

			function n(e) {
				return function(t) {
					var r = t.Writer,
						n = t.types,
						s = t.util;
					return function(t, a) {
						a = a || r.create();
						for (var u = e.fieldsArray.slice().sort(s.compareFieldsById), l = 0; l <
							u.length; l++) {
							var c = u[l],
								p = e._fieldsArray.indexOf(c),
								h = c.resolvedType instanceof o ? "uint32" : c.type,
								d = i.basic[h],
								f = t[c.name];
							if (c.resolvedType instanceof o && "string" == typeof f && (f = n[p]
									.values[f]), c.map) {
								if (null != f && t.hasOwnProperty(c.name))
									for (var y = Object.keys(f), m = 0; m < y.length; ++m) a
										.uint32((c.id << 3 | 2) >>> 0).fork().uint32(8 | i
											.mapKey[c.keyType])[c.keyType](y[m]), void 0 === d ?
										n[p].encode(f[y[m]], a.uint32(18).fork()).ldelim()
										.ldelim() : a.uint32(16 | d)[h](f[y[m]]).ldelim()
							} else if (c.repeated) {
								if (f && f.length)
									if (c.packed && void 0 !== i.packed[h]) {
										a.uint32((c.id << 3 | 2) >>> 0).fork();
										for (var g = 0; g < f.length; g++) a[h](f[g]);
										a.ldelim()
									} else
										for (var v = 0; v < f.length; v++) void 0 === d ? c
											.resolvedType.group ? n[p].encode(f[v], a.uint32((c
												.id << 3 | 3) >>> 0)).uint32((c.id << 3 | 4) >>>
												0) : n[p].encode(f[v], a.uint32((c.id << 3 |
												2) >>> 0).fork()).ldelim() : a.uint32((c.id <<
												3 | d) >>> 0)[h](f[v])
							} else(!c.optional || null != f && t.hasOwnProperty(c.name)) && (c
								.optional || null != f && t.hasOwnProperty(c.name) ||
								console.warn("注意啦!!!很大概率会报错 类型:", t.$type ? t.$type.name :
									"不晓得", "没有设置对应的属性:", c.name,
									"检查是不是proto文件属性设置为了required"), void 0 === d ? c
								.resolvedType.group ? n[p].encode(f, a.uint32((c.id << 3 |
									3) >>> 0)).uint32((c.id << 3 | 4) >>> 0) : n[p].encode(
									f, a.uint32((c.id << 3 | 2) >>> 0).fork()).ldelim() : a
								.uint32((c.id << 3 | d) >>> 0)[h](f))
						}
						return a
					}
				}
			}
			e.exports = n, n._configure = function() {
				o = r(10), i = r(24)
			}
		}, function(e, t, r) {
			"use strict";
			var o, i, n, s = r(0)(r(4));

			function a(e) {
				return "missing required '" + e.name + "'"
			}

			function u(e) {
				return function(t) {
					var r = t.Reader,
						u = t.types,
						l = t.util;
					return function(t, c) {
						t instanceof r || (t = r.create(t));
						for (var p, h = void 0 === c ? t.len : t.pos + c, d = new this.ctor; t
							.pos < h;) {
							var f = t.uint32();
							if (e.group && 4 == (7 & f)) break;
							for (var y = f >>> 3, m = 0, g = !1; m < e.fieldsArray.length; ++
								m) {
								var v = e._fieldsArray[m].resolve(),
									_ = v.name,
									N = v.resolvedType instanceof o ? "int32" : v.type;
								if (y == v.id) {
									if (g = !0, v.map) t.skip().pos++, d[_] === l.emptyObject &&
										(d[_] = {}), p = t[v.keyType](), t.pos++, null != i
										.long[v.keyType] ? null == i.basic[N] ? d[_][
											"object" === (0, s.default)(p) ? l.longToHash(p) : p
										] = u[m].decode(t, t.uint32()) : d[_]["object" === (0, s
											.default)(p) ? l.longToHash(p) : p] = t[N]() :
										null == i.basic[N] ? d[_] = u[m].decode(t, t.uint32()) :
										d[_] = t[N]();
									else if (v.repeated)
										if (d[_] && d[_].length || (d[_] = []), null != i
											.packed[N] && 2 == (7 & f))
											for (var E = t.uint32() + t.pos; t.pos < E;) d[_]
												.push(t[N]());
										else null == i.basic[N] ? v.resolvedType.group ? d[_]
											.push(u[m].decode(t)) : d[_].push(u[m].decode(t, t
												.uint32())) : d[_].push(t[N]());
									else null == i.basic[N] ? v.resolvedType.group ? d[_] = u[m]
										.decode(t) : d[_] = u[m].decode(t, t.uint32()) : d[_] =
										t[N]();
									break
								}
							}
							g || (console.log("t", f), t.skipType(7 & f))
						}
						for (m = 0; m < e._fieldsArray.length; ++m) {
							var O = e._fieldsArray[m];
							if (O.required && !d.hasOwnProperty(O.name)) throw n.ProtocolError(
								a(O), {
									instance: d
								})
						}
						return d
					}
				}
			}
			e.exports = u, u._configure = function() {
				o = r(10), i = r(24), n = r(3)
			}
		}, function(e, t, r) {
			"use strict";
			var o, i = t;
			i[".google.protobuf.Any"] = {
				fromObject: function(e) {
					if (e && e["@type"]) {
						var t = this.lookup(e["@type"]);
						if (t) {
							var r = "." === e["@type"].charAt(0) ? e["@type"].substr(1) : e[
								"@type"];
							return this.create({
								type_url: "/" + r,
								value: t.encode(t.fromObject(e)).finish()
							})
						}
					}
					return this.fromObject(e)
				},
				toObject: function(e, t) {
					if (t && t.json && e.type_url && e.value) {
						var r = e.type_url.substring(e.type_url.lastIndexOf("/") + 1),
							i = this.lookup(r);
						i && (e = i.decode(e.value))
					}
					if (!(e instanceof this.ctor) && e instanceof o) {
						var n = e.$type.toObject(e, t);
						return n["@type"] = e.$type.fullName, n
					}
					return this.toObject(e, t)
				}
			}, i._configure = function() {
				o = r(69)
			}
		}, function(e, t, r) {
			"use strict";
			var o, i, n = r(0)(r(4)),
				s = e.exports;

			function a(e, t, r, s) {
				var a = s.m,
					u = s.d,
					l = s.types,
					c = s.ksi,
					p = void 0 !== c;
				if (e.resolvedType)
					if (e.resolvedType instanceof o) {
						for (var h = p ? u[r][c] : u[r], d = e.resolvedType.values, f = Object.keys(d),
								y = 0; y < f.length; y++)
							if (!(e.repeated && d[f[y]] === e.typeDefault || f[y] != h && d[f[y]] !=
								h)) {
								p ? a[r][c] = d[f[y]] : a[r] = d[f[y]];
								break
							}
					} else {
						if ("object" !== (0, n.default)(p ? u[r][c] : u[r])) throw TypeError(e
							.fullName + ": object expected");
						p ? a[r][c] = l[t].fromObject(u[r][c]) : a[r] = l[t].fromObject(u[r])
					}
				else {
					var m = !1;
					switch (e.type) {
						case "double":
						case "float":
							p ? a[r][c] = Number(u[r][c]) : a[r] = Number(u[r]);
							break;
						case "uint32":
						case "fixed32":
							p ? a[r][c] = u[r][c] >>> 0 : a[r] = u[r] >>> 0;
							break;
						case "int32":
						case "sint32":
						case "sfixed32":
							p ? a[r][c] = 0 | u[r][c] : a[r] = 0 | u[r];
							break;
						case "uint64":
							m = !0;
						case "int64":
						case "sint64":
						case "fixed64":
						case "sfixed64":
							i.Long ? p ? a[r][c] = i.Long.fromValue(u[r][c]).unsigned = m : a[r] = i
								.Long.fromValue(u[r]).unsigned = m : "string" == typeof(p ? u[r][c] : u[
									r]) ? p ? a[r][c] = parseInt(u[r][c], 10) : a[r] = parseInt(u[r],
									10) : "number" == typeof(p ? u[r][c] : u[r]) ? p ? a[r][c] = u[r][
								c] : a[r] = u[r] : "object" === (0, n.default)(p ? u[r][c] : u[r]) && (
									p ? a[r][c] = new i.LongBits(u[r][c].low >>> 0, u[r][c].high >>> 0)
									.toNumber(m) : a[r] = new i.LongBits(u[r].low >>> 0, u[r].high >>>
										0).toNumber(m));
							break;
						case "bytes":
							"string" == typeof(p ? u[r][c] : u[r]) ? p ? i.base64.decode(u[r][c], a[r][
								c] = i.newBuffer(i.base64.length(u[r][c])), 0) : i.base64.decode(u[
								r], a[r] = i.newBuffer(i.base64.length(u[r])), 0): (p ? u[r][c] : u[
								r]).length && (p ? a[r][c] = u[r][c] : a[r] = u[r]);
							break;
						case "string":
							p ? a[r][c] = String(u[r][c]) : a[r] = String(u[r]);
							break;
						case "bool":
							p ? a[r][c] = Boolean(u[r][c]) : a[r] = Boolean(u[r])
					}
				}
			}

			function u(e, t, r, n) {
				var s = n.m,
					a = n.d,
					u = n.types,
					l = n.ksi,
					c = n.o,
					p = void 0 !== l;
				if (e.resolvedType) e.resolvedType instanceof o ? p ? a[r][l] = c.enums === String ? u[
						t].values[s[r][l]] : s[r][l] : a[r] = c.enums === String ? u[t].values[s[r]] :
					s[r] : p ? a[r][l] = u[t].toObject(s[r][l], c) : a[r] = u[t].toObject(s[r], c);
				else {
					var h = !1;
					switch (e.type) {
						case "double":
						case "float":
							p ? a[r][l] = c.json && !isFinite(s[r][l]) ? String(s[r][l]) : s[r][l] : a[
								r] = c.json && !isFinite(s[r]) ? String(s[r]) : s[r];
							break;
						case "uint64":
							h = !0;
						case "int64":
						case "sint64":
						case "fixed64":
						case "sfixed64":
							"number" == typeof s[r][l] ? p ? a[r][l] = c.longs === String ? String(s[r][
									l
								]) : s[r][l] : a[r] = c.longs === String ? String(s[r]) : s[r] : p ? a[
									r][l] = c.longs === String ? i.Long.prototype.toString.call(s[r][
								l]) : c.longs === Number ? new i.LongBits(s[r][l].low >>> 0, s[r][l]
									.high >>> 0).toNumber(h) : s[r][l] : a[r] = c.longs === String ? i
								.Long.prototype.toString.call(s[r]) : c.longs === Number ? new i
								.LongBits(s[r].low >>> 0, s[r].high >>> 0).toNumber(h) : s[r];
							break;
						case "bytes":
							p ? a[r][l] = c.bytes === String ? i.base64.encode(s[r][l], 0, s[r][l]
									.length) : c.bytes === Array ? Array.prototype.slice.call(s[r][l]) :
								s[r][l] : a[r] = c.bytes === String ? i.base64.encode(s[r], 0, s[r]
									.length) : c.bytes === Array ? Array.prototype.slice.call(s[r]) : s[
									r];
							break;
						default:
							p ? a[r][l] = s[r][l] : a[r] = s[r]
					}
				}
			}
			s._configure = function() {
				o = r(10), i = r(3)
			}, s.fromObject = function(e) {
				var t = e.fieldsArray;
				return function(e) {
					return function(r) {
						if (r instanceof this.ctor) return r;
						if (!t.length) return new this.ctor;
						for (var s = new this.ctor, u = 0; u < t.length; ++u) {
							var l, c = t[u].resolve(),
								p = c.name;
							if (c.map) {
								if (r[p]) {
									if ("object" !== (0, n.default)(r[p])) throw TypeError(c
										.fullName + ": object expected");
									s[p] = {}
								}
								var h = Object.keys(r[p]);
								for (l = 0; l < h.length; ++l) a(c, u, p, i.merge(i.copy(
								e), {
									m: s,
									d: r,
									ksi: h[l]
								}))
							} else if (c.repeated) {
								if (r[p]) {
									if (!Array.isArray(r[p])) throw TypeError(c.fullName +
										": array expected");
									for (s[p] = [], l = 0; l < r[p].length; ++l) a(c, u, p,
										i.merge(i.copy(e), {
											m: s,
											d: r,
											ksi: l
										}))
								}
							} else(c.resolvedType instanceof o || null != r[p]) && a(c, u,
								p, i.merge(i.copy(e), {
									m: s,
									d: r
								}))
						}
						return s
					}
				}
			}, s.toObject = function(e) {
				var t = e.fieldsArray.slice().sort(i.compareFieldsById);
				return function(r) {
					return t.length ? function(n, s) {
						s = s || {};
						for (var a, l, c = {}, p = [], h = [], d = [], f = 0; f < t
							.length; ++f) t[f].partOf || (t[f].resolve().repeated ? p : t[f]
							.map ? h : d).push(t[f]);
						if (p.length && (s.arrays || s.defaults))
							for (f = 0; f < p.length; ++f) c[p[f].name] = [];
						if (h.length && (s.objects || s.defaults))
							for (f = 0; f < h.length; ++f) c[h[f].name] = {};
						if (d.length && s.defaults)
							for (f = 0; f < d.length; ++f)
								if (l = (a = d[f]).name, a.resolvedType instanceof o) c[l] =
									s.enums = String ? a.resolvedType.valuesById[a
										.typeDefault] : a.typeDefault;
								else if (a.long)
							if (i.Long) {
								var y = new i.Long(a.typeDefault.low, a.typeDefault.high, a
									.typeDefault.unsigned);
								c[l] = s.longs === String ? y.toString() : s.longs ===
									Number ? y.toNumber() : y
							} else c[l] = s.longs === String ? a.typeDefault.toString() : a
								.typeDefault.toNumber();
						else a.bytes ? c[l] = s.bytes === String ? String.fromCharCode
							.apply(String, a.typeDefault) : Array.prototype.slice.call(a
								.typeDefault).join("*..*").split("*..*") : c[l] = a
							.typeDefault;
						var m = !1;
						for (f = 0; f < t.length; ++f) {
							l = (a = t[f]).name;
							var g, v, _ = e._fieldsArray.indexOf(a);
							if (a.map) {
								if (m || (m = !0), n[l] && (g = Object.keys(n[l]).length))
									for (c[l] = {}, v = 0; v < g.length; ++v) u(a, _, l, i
										.merge(i.copy(r), {
											m: n,
											d: c,
											ksi: g[v],
											o: s
										}))
							} else if (a.repeated) {
								if (n[l] && n[l].length)
									for (c[l] = [], v = 0; v < n[l].length; ++v) u(a, _, l,
										i.merge(i.copy(r), {
											m: n,
											d: c,
											ksi: v,
											o: s
										}))
							} else null != n[l] && n.hasOwnProperty(l) && u(a, _, l, i
								.merge(i.copy(r), {
									m: n,
									d: c,
									o: s
								})), a.partOf && s.oneofs && (c[a.partOf.name] = l)
						}
						return c
					} : function() {
						return {}
					}
				}
			}
		}, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
		function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i, n = o(r(38)),
				s = o(r(54)),
				a = o(r(8)),
				u = o(r(65)),
				l = o(r(158)),
				c = o(r(7)),
				p = o(r(165)),
				h = o(r(14)),
				d = o(r(28)),
				f = h.default.getLogger("IM-SDK-LOG"),
				y = (0, c.default)(),
				m = (0, u.default)(),
				g = s.default.connection.prototype.root = l.default.Root.fromJSON(m),
				v = p.default.getEnvInfo(),
				_ = v.global;
			s.default.connection.prototype.getParams({
				root: g,
				utils: p.default
			});
			var N = function(e, t, r, o) {
				var n = {};
				if ("zfb" === v.platform) {
					for (var s = "", a = 0; a < e.length; a++) {
						s += String.fromCharCode(e[a])
					}
					n = {
						data: s = d.default.btoa(s),
						isBuffer: !1,
						complete: function(e) {},
						fail: function(e) {
							"sendSocketMessage:fail taskID not exist" == e.errMsg && t
								.reconnect(), t._msgHash && t._msgHash[o] && t._msgHash[o]
								.fail({
									id: o
								})
						}
					}
				} else {
					n = {
						data: new Uint8Array(e).buffer,
						fail: function(e) {
							"sendSocketMessage:fail taskID not exist" == e.errMsg && t
								.reconnect(), t._msgHash && t._msgHash[o] && t._msgHash[o]
								.fail({
									id: o
								})
						}
					}
				}
				if (r) return n;
				try {
					i.send(n)
				} catch (e) {
					t.onError({
						type: y.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,
						message: "send message error",
						data: e
					})
				}
			};
			_.onNetworkStatusChange((function(e) {
				e.isConnected ? function() {
					if (s.default.conn.isDebug && console.log(
							"------- im online ------"), s.default.conn.netStatus =
						"online", !s.default.conn.isOpened())
						if (s.default.conn.context.accessToken) b({
							access_token: s.default.conn.context.accessToken
						}, s.default.conn);
						else {
							var e = {
								type: y.WEBIM_CONNCTION_DISCONNECTED,
								message: "websocket has been disconnected"
							};
							s.default.conn.onError(e)
						}
				}() : (s.default.conn.netStatus = "offline", s.default.conn.isDebug &&
					console.log("------- im offline -----"))
			}));
			var E = function e(t) {
				(0, n.default)(this, e), this.onOpen = my.onSocketOpen, this.onClose = my
					.onSocketClose, this.onMessage = my.onSocketMessage, this.onError = my
					.onSocketError, this.close = my.closeSocket, this.send = my.sendSocketMessage,
					this.connectSocket = my.connectSocket, this.readyState = "", this.connect =
					function() {
						my.connectSocket({
							url: t.url,
							header: {
								"content-type": "application/json"
							},
							success: function(e) {
								f.debug("websocket connect success")
							},
							fail: function() {
								f.debug("websocket connect fail")
							}
						})
					}
			};

			function O(e) {
				t && t.close && t.close();
				var t = _.connectSocket({
					url: e.url,
					header: {
						"content-type": "application/json"
					},
					success: function(e) {
						f.debug("socket连接成功", e)
					},
					fail: function(e) {
						e.errMsg.indexOf("suspend")
					},
					complete: function() {}
				});
				return t
			}
			var b = function(e, t) {
				var r;
				e && ("offline" != s.default.conn.netStatus && (i = "zfb" === v.platform ? new E(
					t) : O(t), s.default.connection.prototype.sock = i, i.onOpen((
				function() {
						f.debug("onOpen ----"), t.autoReconnectInterval = 0,
							"zfb" === v.platform && (i.readyState = 1), t.times = 1,
							t.autoReconnectNumTotal = 0;
						var r = [],
							o = (new Date).valueOf(),
							n = g.lookup("easemob.pb.Provision"),
							a = n.decode(r),
							u = "",
							l = "",
							c = "";
						"webim" === t.deviceId ? (c = o.toString(), u = s.default
								.connection.deviceId + "_" + c, l = s.default
								.connection.deviceId) : u = l = c = s.default
							.connection.deviceId + "_" + t.deviceId, t.context.jid
							.clientResource = u, a.compressType = t.compressType, a
							.encryptType = t.encryptType, a.osType = t.osType, a
							.version = t.version, a.deviceName = l, a.resource = u,
							a.deviceUuid = u, a.auth = "$t$" + e.access_token, t
							.isDebug && console.log("onOpen:", a), a = n.encode(a)
							.finish();
						var p = g.lookup("easemob.pb.MSync"),
							h = p.decode(r);
						if (h.version = t.version, h.guid = t.context.jid, h.auth =
							"$t$" + e.access_token, h.command = 3, h.deviceId = l, h
							.encryptType = t.encryptType, h.payload = a, h = p
							.encode(h).finish(), N(h), t.logOut = !1, t
							.offLineSendConnecting = !1, t.unSendMsgArr.length > 0
							) {
							for (var d = 0; d < t.unSendMsgArr.length; d++) {
								var y = t.unSendMsgArr[d];
								t.sendMSync(y)
							}
							t.unSendMsgArr = []
						}
					})), i.onClose((function(e) {
						if ("zfb" === v.platform && (i.readyState = 3), !t.logOut &&
							t.autoReconnectNumTotal < t.autoReconnectNumMax && (t
								.autoReconnectNumTotal <= t.socketHost.length && t
								.isHttpDNS || !t.isHttpDNS)) {
							t.reconnect();
							var r = {
								type: y.WEBIM_CONNCTION_DISCONNECTED,
								message: "websocket has been disconnected"
							};
							t.onError(r)
						} else if (t.logOut) t.clear(), t.onClosed();
						else {
							r = {
								type: y.WEBIM_CONNCTION_DISCONNECTED,
								message: "websocket has been disconnected"
							};
							t.onError(r), t.onClosed()
						}
					})), i.onMessage((function(e) {
						if ("zfb" === v.platform) {
							for (var o = d.default.atob(e.data), i = [], n = 0, s =
									o.length; n < s; ++n) i.push(o.charCodeAt(n));
							var u = g.lookup("easemob.pb.MSync").decode(i)
						} else u = g.lookup("easemob.pb.MSync").decode(e.data);
						switch (u.command) {
							case 0:
								var l = g.lookup("easemob.pb.CommSyncDL");
								l = l.decode(u.payload);
								var c = new a.default(l.serverId.low, l.serverId
										.high, l.serverId.unsigned).toString(),
									h = new a.default(l.metaId.low, l.metaId.high, l
										.metaId.unsigned).toString();
								if (0 !== l.metas.length) {
									if (t._metapayload(l.metas, l.status, t), l
										.isLast) return !1 !== (f = p.default
											.checkArray(t._queues, l.queue)) &&
										t._queues.splice(f, 1), void(t._queues
											.length > 0 && (t._backqueue(t
													._queues[0], t), this
												.qTimer && clearTimeout(this
													.qTimer)));
									t._lastsession(l.nextKey, l.queue, t)
								} else if (l.isLast) {
									var f;
									!1 !== (f = p.default.checkArray(t._queues, l
											.queue)) && t._queues.splice(f, 1), t
										._queues.length > 0 && (t._backqueue(t
											._queues[0], t), r && clearTimeout(
											r))
								} else if (l.status && 0 === l.status.errorCode) {
									if (t._msgHash[h]) {
										try {
											t._msgHash[h]
												.success instanceof Function && t
												._msgHash[h].success(h, c)
										} catch (e) {
											t.onError({
												type: y
													.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
												message: "when executing success function error",
												data: e
											})
										}
										t.onReceivedMessage({
											id: h,
											mid: c,
											to: t._msgHash[h].to
										}), delete t._msgHash[h]
									}
								} else if (l.status && 15 === l.status.errorCode) t
									.onMutedMessage({
										mid: c
									});
								else if (l.status && 1 === l.status.errorCode) {
									var m = "";
									switch (l.status.reason) {
										case "blocked":
											m = y.PERMISSION_DENIED;
											break;
										case "group not found":
											m = y.GROUP_NOT_EXIST;
											break;
										case "not in group or chatroom":
											m = y.GROUP_NOT_JOINED;
											break;
										case "exceed recall time limit":
											m = y.MESSAGE_RECALL_TIME_LIMIT;
											break;
										case "message recall disabled":
											m = y.SERVICE_NOT_ENABLED;
											break;
										case "not in group or chatroom white list":
											m = y.SERVICE_NOT_ALLOW_MESSAGING;
											break;
										default:
											m = y.SERVER_UNKNOWN_ERROR
									}
									t._msgHash[h] && t._msgHash[h]
										.fail instanceof Function && t._msgHash[h]
										.fail({
											type: m,
											reason: l.status.reason ? l.status
												.reason : "",
											data: {
												id: h,
												mid: c
											}
										})
								} else if (l.status && 7 === l.status.errorCode &&
									"sensitive words" === l.status.reason) t
									._msgHash[h] && t._msgHash[h]
									.fail instanceof Function && t._msgHash[h]
								.fail({
										type: y.MESSAGE_INCLUDE_ILLEGAL_CONTENT,
										data: {
											id: h,
											mid: c
										}
									});
								else if (t._msgHash[h]) {
									try {
										t._msgHash[h].fail instanceof Function && t
											._msgHash[h].fail({
												type: y.WEBIM_LOAD_MSG_ERROR,
												data: {
													errorCode: l.status && l
														.status.errorCode,
													reason: l.status && l.status
														.reason
												}
											})
									} catch (e) {
										t.onError({
											type: y
												.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
											message: "when executing fail function error",
											data: e
										})
									}
									delete t._msgHash[h]
								} else t.onError({
									type: y
										.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
									message: "on message error"
								});
								break;
							case 1:
								var _ = g.lookup("easemob.pb.CommUnreadDL");
								if (_ = _.decode(u.payload), t.isDebug && console
									.log("下行CommUnreadDLMessage：", _), 0 === _
									.unread.length);
								else
									for (n = 0; n < _.unread.length; n++) t
										._backqueue(_.unread[n].queue, t);
								t._rebuild();
								break;
							case 2:
								var N = g.lookup("easemob.pb.CommNotice").decode(u
									.payload);
								if (t.isDebug && console.log("下行noticeMessage：", N),
									!1 !== p.default.checkArray(t._queues, N.queue))
									return;
								t._queues.push(N.queue), 1 == t._queues.length && t
									._backqueue(N.queue, t), r && clearTimeout(r),
									r = setTimeout((function() {
										var e = N.queue;
										!1 !== p.default.checkArray(t
											._queues, e) && (t
											._backqueue(e, t), t
											.isDebug && console.log(
												"上行q: ", e, t._queues, N
												.queue))
									}), 2e4);
								break;
							case 3:
								t._receiveProvision(u, t), t.isDebug && console.log(
									"下行Provision：", u)
						}
					})), i.onError((function(e) {
						t.onError({
							type: y.WEBIM_CONNECTION_ERROR,
							message: "on socket error",
							data: e,
							failMsgs: t._msgHash
						}), t.reconnect()
					})), "" != (e.access_token || "") ? (t.context.accessToken = e
						.access_token, i.connect && i.connect()) : t.onError({
						type: y.WEBIM_CONNCTION_OPEN_USERGRID_ERROR,
						message: "token not assign error",
						data: e
					})))
			};
			s.default.connection.prototype._base64transform = N, s.default.connection.prototype
				._getSock = O, s.default.connection.prototype._login = b, s.default.logger = f, s
				.default.connection.deviceId = "miniProgram";
			var T = s.default;
			t.default = T
		},
		function(e, t, r) {
			"use strict";
			e.exports = function() {
				var e = {};

				function t(t, r, o) {
					return "function" == typeof r ? (o = r, r = new e.Root) : r || (r = new e.Root),
						r.load(t, o)
				}

				function o(t, r) {
					return r || (r = new e.Root), r.loadSync(t)
				}

				function i(t, r, o) {
					return "function" == typeof r ? (o = r, r = new e.Root) : r || (r = new e.Root),
						r.parseFromPbString(t, o)
				}

				function n() {
					e.converter._configure(), e.decoder._configure(), e.encoder._configure(), e
						.Field._configure(), e.MapField._configure(), e.Message._configure(), e
						.Namespace._configure(), e.Method._configure(), e.ReflectionObject
						._configure(), e.OneOf._configure(), e.parse._configure(), e.Reader
						._configure(), e.Root._configure(), e.Service._configure(), e.verifier
						._configure(), e.Type._configure(), e.types._configure(), e.wrappers
						._configure(), e.Writer._configure()
				}
				if (e.build = "minimal", e.Writer = r(94), e.encoder = r(103), e.Reader = r(101), e
					.util = r(3), e.rpc = r(99), e.roots = r(95), e.verifier = r(102), e.tokenize =
					r(98), e.parse = r(97), e.common = r(100), e.ReflectionObject = r(23), e
					.Namespace = r(33), e.Root = r(40), e.Enum = r(10), e.Type = r(22), e.Field = r(
						16), e.OneOf = r(34), e.MapField = r(67), e.Service = r(41), e.Method = r(
						68), e.converter = r(106), e.decoder = r(104), e.Message = r(69), e
					.wrappers = r(105), e.types = r(24), e.util = r(3), e.configure = n, e.load = t,
					e.loadSync = o, e.parseFromPbString = i, n(), arguments && arguments.length)
					for (var s = 0; s < arguments.length; s++) {
						var a = arguments[s];
						if (a.hasOwnProperty("exports")) return void(a.exports = e)
					}
				return e
			}()
		},
		function(e, t, r) {
			"use strict";
			e.exports = i;
			var o = null;
			try {
				o = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1,
					0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127,
					3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3,
					109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105,
					118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101,
					109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,
					10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1,
					173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132,
					126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126,
					32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173,
					66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167,
					11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2,
					173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36,
					0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32,
					134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66,
					32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32,
					1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132,
					130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
				])), {}).exports
			} catch (e) {}

			function i(e, t, r) {
				this.low = 0 | e, this.high = 0 | t, this.unsigned = !!r
			}

			function n(e) {
				return !0 === (e && e.__isLong__)
			}
			i.prototype.__isLong__, Object.defineProperty(i.prototype, "__isLong__", {
				value: !0
			}), i.isLong = n;
			var s = {},
				a = {};

			function u(e, t) {
				var r, o, i;
				return t ? (i = 0 <= (e >>>= 0) && e < 256) && (o = a[e]) ? o : (r = c(e, (0 | e) < 0 ?
					-1 : 0, !0), i && (a[e] = r), r) : (i = -128 <= (e |= 0) && e < 128) && (o = s[
					e]) ? o : (r = c(e, e < 0 ? -1 : 0, !1), i && (s[e] = r), r)
			}

			function l(e, t) {
				if (isNaN(e)) return t ? _ : v;
				if (t) {
					if (e < 0) return _;
					if (e >= y) return T
				} else {
					if (e <= -m) return I;
					if (e + 1 >= m) return b
				}
				return e < 0 ? l(-e, t).neg() : c(e % f | 0, e / f | 0, t)
			}

			function c(e, t, r) {
				return new i(e, t, r)
			}
			i.fromInt = u, i.fromNumber = l, i.fromBits = c;
			var p = Math.pow;

			function h(e, t, r) {
				if (0 === e.length) throw Error("empty string");
				if ("NaN" === e || "Infinity" === e || "+Infinity" === e || "-Infinity" === e) return v;
				if ("number" == typeof t ? (r = t, t = !1) : t = !!t, (r = r || 10) < 2 || 36 < r)
				throw RangeError("radix");
				var o;
				if ((o = e.indexOf("-")) > 0) throw Error("interior hyphen");
				if (0 === o) return h(e.substring(1), t, r).neg();
				for (var i = l(p(r, 8)), n = v, s = 0; s < e.length; s += 8) {
					var a = Math.min(8, e.length - s),
						u = parseInt(e.substring(s, s + a), r);
					if (a < 8) {
						var c = l(p(r, a));
						n = n.mul(c).add(l(u))
					} else n = (n = n.mul(i)).add(l(u))
				}
				return n.unsigned = t, n
			}

			function d(e, t) {
				return "number" == typeof e ? l(e, t) : "string" == typeof e ? h(e, t) : c(e.low, e
					.high, "boolean" == typeof t ? t : e.unsigned)
			}
			i.fromString = h, i.fromValue = d;
			var f = 4294967296,
				y = f * f,
				m = y / 2,
				g = u(1 << 24),
				v = u(0);
			i.ZERO = v;
			var _ = u(0, !0);
			i.UZERO = _;
			var N = u(1);
			i.ONE = N;
			var E = u(1, !0);
			i.UONE = E;
			var O = u(-1);
			i.NEG_ONE = O;
			var b = c(-1, 2147483647, !1);
			i.MAX_VALUE = b;
			var T = c(-1, -1, !0);
			i.MAX_UNSIGNED_VALUE = T;
			var I = c(0, -2147483648, !1);
			i.MIN_VALUE = I;
			var C = i.prototype;
			C.toInt = function() {
				return this.unsigned ? this.low >>> 0 : this.low
			}, C.toNumber = function() {
				return this.unsigned ? (this.high >>> 0) * f + (this.low >>> 0) : this.high * f + (
					this.low >>> 0)
			}, C.toString = function(e) {
				if ((e = e || 10) < 2 || 36 < e) throw RangeError("radix");
				if (this.isZero()) return "0";
				if (this.isNegative()) {
					if (this.eq(I)) {
						var t = l(e),
							r = this.div(t),
							o = r.mul(t).sub(this);
						return r.toString(e) + o.toInt().toString(e)
					}
					return "-" + this.neg().toString(e)
				}
				for (var i = l(p(e, 6), this.unsigned), n = this, s = "";;) {
					var a = n.div(i),
						u = (n.sub(a.mul(i)).toInt() >>> 0).toString(e);
					if ((n = a).isZero()) return u + s;
					for (; u.length < 6;) u = "0" + u;
					s = "" + u + s
				}
			}, C.getHighBits = function() {
				return this.high
			}, C.getHighBitsUnsigned = function() {
				return this.high >>> 0
			}, C.getLowBits = function() {
				return this.low
			}, C.getLowBitsUnsigned = function() {
				return this.low >>> 0
			}, C.getNumBitsAbs = function() {
				if (this.isNegative()) return this.eq(I) ? 64 : this.neg().getNumBitsAbs();
				for (var e = 0 != this.high ? this.high : this.low, t = 31; t > 0 && 0 == (e & 1 <<
						t); t--);
				return 0 != this.high ? t + 33 : t + 1
			}, C.isZero = function() {
				return 0 === this.high && 0 === this.low
			}, C.eqz = C.isZero, C.isNegative = function() {
				return !this.unsigned && this.high < 0
			}, C.isPositive = function() {
				return this.unsigned || this.high >= 0
			}, C.isOdd = function() {
				return 1 == (1 & this.low)
			}, C.isEven = function() {
				return 0 == (1 & this.low)
			}, C.equals = function(e) {
				return n(e) || (e = d(e)), (this.unsigned === e.unsigned || this.high >>> 31 != 1 ||
					e.high >>> 31 != 1) && (this.high === e.high && this.low === e.low)
			}, C.eq = C.equals, C.notEquals = function(e) {
				return !this.eq(e)
			}, C.neq = C.notEquals, C.ne = C.notEquals, C.lessThan = function(e) {
				return this.comp(e) < 0
			}, C.lt = C.lessThan, C.lessThanOrEqual = function(e) {
				return this.comp(e) <= 0
			}, C.lte = C.lessThanOrEqual, C.le = C.lessThanOrEqual, C.greaterThan = function(e) {
				return this.comp(e) > 0
			}, C.gt = C.greaterThan, C.greaterThanOrEqual = function(e) {
				return this.comp(e) >= 0
			}, C.gte = C.greaterThanOrEqual, C.ge = C.greaterThanOrEqual, C.compare = function(e) {
				if (n(e) || (e = d(e)), this.eq(e)) return 0;
				var t = this.isNegative(),
					r = e.isNegative();
				return t && !r ? -1 : !t && r ? 1 : this.unsigned ? e.high >>> 0 > this.high >>>
					0 || e.high === this.high && e.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(e)
					.isNegative() ? -1 : 1
			}, C.comp = C.compare, C.negate = function() {
				return !this.unsigned && this.eq(I) ? I : this.not().add(N)
			}, C.neg = C.negate, C.add = function(e) {
				n(e) || (e = d(e));
				var t = this.high >>> 16,
					r = 65535 & this.high,
					o = this.low >>> 16,
					i = 65535 & this.low,
					s = e.high >>> 16,
					a = 65535 & e.high,
					u = e.low >>> 16,
					l = 0,
					p = 0,
					h = 0,
					f = 0;
				return h += (f += i + (65535 & e.low)) >>> 16, p += (h += o + u) >>> 16, l += (p +=
					r + a) >>> 16, l += t + s, c((h &= 65535) << 16 | (f &= 65535), (l &=
					65535) << 16 | (p &= 65535), this.unsigned)
			}, C.subtract = function(e) {
				return n(e) || (e = d(e)), this.add(e.neg())
			}, C.sub = C.subtract, C.multiply = function(e) {
				if (this.isZero()) return v;
				if (n(e) || (e = d(e)), o) return c(o.mul(this.low, this.high, e.low, e.high), o
					.get_high(), this.unsigned);
				if (e.isZero()) return v;
				if (this.eq(I)) return e.isOdd() ? I : v;
				if (e.eq(I)) return this.isOdd() ? I : v;
				if (this.isNegative()) return e.isNegative() ? this.neg().mul(e.neg()) : this.neg()
					.mul(e).neg();
				if (e.isNegative()) return this.mul(e.neg()).neg();
				if (this.lt(g) && e.lt(g)) return l(this.toNumber() * e.toNumber(), this.unsigned);
				var t = this.high >>> 16,
					r = 65535 & this.high,
					i = this.low >>> 16,
					s = 65535 & this.low,
					a = e.high >>> 16,
					u = 65535 & e.high,
					p = e.low >>> 16,
					h = 65535 & e.low,
					f = 0,
					y = 0,
					m = 0,
					_ = 0;
				return m += (_ += s * h) >>> 16, y += (m += i * h) >>> 16, m &= 65535, y += (m +=
						s * p) >>> 16, f += (y += r * h) >>> 16, y &= 65535, f += (y += i * p) >>>
					16, y &= 65535, f += (y += s * u) >>> 16, f += t * h + r * p + i * u + s * a, c(
						(m &= 65535) << 16 | (_ &= 65535), (f &= 65535) << 16 | (y &= 65535), this
						.unsigned)
			}, C.mul = C.multiply, C.divide = function(e) {
				if (n(e) || (e = d(e)), e.isZero()) throw Error("division by zero");
				var t, r, i;
				if (o) return this.unsigned || -2147483648 !== this.high || -1 !== e.low || -1 !== e
					.high ? c((this.unsigned ? o.div_u : o.div_s)(this.low, this.high, e.low, e
						.high), o.get_high(), this.unsigned) : this;
				if (this.isZero()) return this.unsigned ? _ : v;
				if (this.unsigned) {
					if (e.unsigned || (e = e.toUnsigned()), e.gt(this)) return _;
					if (e.gt(this.shru(1))) return E;
					i = _
				} else {
					if (this.eq(I)) return e.eq(N) || e.eq(O) ? I : e.eq(I) ? N : (t = this.shr(1)
						.div(e).shl(1)).eq(v) ? e.isNegative() ? N : O : (r = this.sub(e
						.mul(t)), i = t.add(r.div(e)));
					if (e.eq(I)) return this.unsigned ? _ : v;
					if (this.isNegative()) return e.isNegative() ? this.neg().div(e.neg()) : this
						.neg().div(e).neg();
					if (e.isNegative()) return this.div(e.neg()).neg();
					i = v
				}
				for (r = this; r.gte(e);) {
					t = Math.max(1, Math.floor(r.toNumber() / e.toNumber()));
					for (var s = Math.ceil(Math.log(t) / Math.LN2), a = s <= 48 ? 1 : p(2, s - 48),
							u = l(t), h = u.mul(e); h.isNegative() || h.gt(r);) h = (u = l(t -= a,
						this.unsigned)).mul(e);
					u.isZero() && (u = N), i = i.add(u), r = r.sub(h)
				}
				return i
			}, C.div = C.divide, C.modulo = function(e) {
				return n(e) || (e = d(e)), o ? c((this.unsigned ? o.rem_u : o.rem_s)(this.low, this
					.high, e.low, e.high), o.get_high(), this.unsigned) : this.sub(this.div(e)
					.mul(e))
			}, C.mod = C.modulo, C.rem = C.modulo, C.not = function() {
				return c(~this.low, ~this.high, this.unsigned)
			}, C.and = function(e) {
				return n(e) || (e = d(e)), c(this.low & e.low, this.high & e.high, this.unsigned)
			}, C.or = function(e) {
				return n(e) || (e = d(e)), c(this.low | e.low, this.high | e.high, this.unsigned)
			}, C.xor = function(e) {
				return n(e) || (e = d(e)), c(this.low ^ e.low, this.high ^ e.high, this.unsigned)
			}, C.shiftLeft = function(e) {
				return n(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this.low << e,
					this.high << e | this.low >>> 32 - e, this.unsigned) : c(0, this.low << e -
					32, this.unsigned)
			}, C.shl = C.shiftLeft, C.shiftRight = function(e) {
				return n(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this.low >>> e |
					this.high << 32 - e, this.high >> e, this.unsigned) : c(this.high >> e - 32,
					this.high >= 0 ? 0 : -1, this.unsigned)
			}, C.shr = C.shiftRight, C.shiftRightUnsigned = function(e) {
				if (n(e) && (e = e.toInt()), 0 === (e &= 63)) return this;
				var t = this.high;
				return e < 32 ? c(this.low >>> e | t << 32 - e, t >>> e, this.unsigned) : c(32 ===
					e ? t : t >>> e - 32, 0, this.unsigned)
			}, C.shru = C.shiftRightUnsigned, C.shr_u = C.shiftRightUnsigned, C.toSigned =
			function() {
				return this.unsigned ? c(this.low, this.high, !1) : this
			}, C.toUnsigned = function() {
				return this.unsigned ? this : c(this.low, this.high, !0)
			}, C.toBytes = function(e) {
				return e ? this.toBytesLE() : this.toBytesBE()
			}, C.toBytesLE = function() {
				var e = this.high,
					t = this.low;
				return [255 & t, t >>> 8 & 255, t >>> 16 & 255, t >>> 24, 255 & e, e >>> 8 & 255,
					e >>> 16 & 255, e >>> 24
				]
			}, C.toBytesBE = function() {
				var e = this.high,
					t = this.low;
				return [e >>> 24, e >>> 16 & 255, e >>> 8 & 255, 255 & e, t >>> 24, t >>> 16 & 255,
					t >>> 8 & 255, 255 & t
				]
			}, i.fromBytes = function(e, t, r) {
				return r ? i.fromBytesLE(e, t) : i.fromBytesBE(e, t)
			}, i.fromBytesLE = function(e, t) {
				return new i(e[0] | e[1] << 8 | e[2] << 16 | e[3] << 24, e[4] | e[5] << 8 | e[6] <<
					16 | e[7] << 24, t)
			}, i.fromBytesBE = function(e, t) {
				return new i(e[4] << 24 | e[5] << 16 | e[6] << 8 | e[7], e[0] << 24 | e[1] << 16 |
					e[2] << 8 | e[3], t)
			}
		},
		function(e, t, r) {
			"use strict";
			e.exports = function(e, t, r) {
				var o = r || 8192,
					i = o >>> 1,
					n = null,
					s = o;
				return function(r) {
					if (r < 1 || r > i) return e(r);
					s + r > o && (n = e(o), s = 0);
					var a = t.call(n, s, s += r);
					return 7 & s && (s = 1 + (7 | s)), a
				}
			}
		},
		function(e, t, r) {
			"use strict";

			function o(e) {
				return "undefined" != typeof Float32Array ? function() {
					var t = new Float32Array([-0]),
						r = new Uint8Array(t.buffer),
						o = 128 === r[3];

					function i(e, o, i) {
						t[0] = e, o[i] = r[0], o[i + 1] = r[1], o[i + 2] = r[2], o[i + 3] = r[3]
					}

					function n(e, o, i) {
						t[0] = e, o[i] = r[3], o[i + 1] = r[2], o[i + 2] = r[1], o[i + 3] = r[0]
					}

					function s(e, o) {
						return r[0] = e[o], r[1] = e[o + 1], r[2] = e[o + 2], r[3] = e[o + 3], t[0]
					}

					function a(e, o) {
						return r[3] = e[o], r[2] = e[o + 1], r[1] = e[o + 2], r[0] = e[o + 3], t[0]
					}
					e.writeFloatLE = o ? i : n, e.writeFloatBE = o ? n : i, e.readFloatLE = o ? s :
						a, e.readFloatBE = o ? a : s
				}() : function() {
					function t(e, t, r, o) {
						var i = t < 0 ? 1 : 0;
						if (i && (t = -t), 0 === t) e(1 / t > 0 ? 0 : 2147483648, r, o);
						else if (isNaN(t)) e(2143289344, r, o);
						else if (t > 34028234663852886e22) e((i << 31 | 2139095040) >>> 0, r, o);
						else if (t < 11754943508222875e-54) e((i << 31 | Math.round(t /
							1401298464324817e-60)) >>> 0, r, o);
						else {
							var n = Math.floor(Math.log(t) / Math.LN2);
							e((i << 31 | n + 127 << 23 | 8388607 & Math.round(t * Math.pow(2, -n) *
								8388608)) >>> 0, r, o)
						}
					}

					function r(e, t, r) {
						var o = e(t, r),
							i = 2 * (o >> 31) + 1,
							n = o >>> 23 & 255,
							s = 8388607 & o;
						return 255 === n ? s ? NaN : i * (1 / 0) : 0 === n ? 1401298464324817e-60 *
							i * s : i * Math.pow(2, n - 150) * (s + 8388608)
					}
					e.writeFloatLE = t.bind(null, i), e.writeFloatBE = t.bind(null, n), e
						.readFloatLE = r.bind(null, s), e.readFloatBE = r.bind(null, a)
				}(), "undefined" != typeof Float64Array ? function() {
					var t = new Float64Array([-0]),
						r = new Uint8Array(t.buffer),
						o = 128 === r[7];

					function i(e, o, i) {
						t[0] = e, o[i] = r[0], o[i + 1] = r[1], o[i + 2] = r[2], o[i + 3] = r[3], o[
							i + 4] = r[4], o[i + 5] = r[5], o[i + 6] = r[6], o[i + 7] = r[7]
					}

					function n(e, o, i) {
						t[0] = e, o[i] = r[7], o[i + 1] = r[6], o[i + 2] = r[5], o[i + 3] = r[4], o[
							i + 4] = r[3], o[i + 5] = r[2], o[i + 6] = r[1], o[i + 7] = r[0]
					}

					function s(e, o) {
						return r[0] = e[o], r[1] = e[o + 1], r[2] = e[o + 2], r[3] = e[o + 3], r[
							4] = e[o + 4], r[5] = e[o + 5], r[6] = e[o + 6], r[7] = e[o + 7], t[0]
					}

					function a(e, o) {
						return r[7] = e[o], r[6] = e[o + 1], r[5] = e[o + 2], r[4] = e[o + 3], r[
							3] = e[o + 4], r[2] = e[o + 5], r[1] = e[o + 6], r[0] = e[o + 7], t[0]
					}
					e.writeDoubleLE = o ? i : n, e.writeDoubleBE = o ? n : i, e.readDoubleLE = o ?
						s : a, e.readDoubleBE = o ? a : s
				}() : function() {
					function t(e, t, r, o, i, n) {
						var s = o < 0 ? 1 : 0;
						if (s && (o = -o), 0 === o) e(0, i, n + t), e(1 / o > 0 ? 0 : 2147483648, i,
							n + r);
						else if (isNaN(o)) e(0, i, n + t), e(2146959360, i, n + r);
						else if (o > 17976931348623157e292) e(0, i, n + t), e((s << 31 |
							2146435072) >>> 0, i, n + r);
						else {
							var a;
							if (o < 22250738585072014e-324) e((a = o / 5e-324) >>> 0, i, n + t), e((
								s << 31 | a / 4294967296) >>> 0, i, n + r);
							else {
								var u = Math.floor(Math.log(o) / Math.LN2);
								1024 === u && (u = 1023), e(4503599627370496 * (a = o * Math.pow(2,
									-u)) >>> 0, i, n + t), e((s << 31 | u + 1023 << 20 |
									1048576 * a & 1048575) >>> 0, i, n + r)
							}
						}
					}

					function r(e, t, r, o, i) {
						var n = e(o, i + t),
							s = e(o, i + r),
							a = 2 * (s >> 31) + 1,
							u = s >>> 20 & 2047,
							l = 4294967296 * (1048575 & s) + n;
						return 2047 === u ? l ? NaN : a * (1 / 0) : 0 === u ? 5e-324 * a * l : a *
							Math.pow(2, u - 1075) * (l + 4503599627370496)
					}
					e.writeDoubleLE = t.bind(null, i, 0, 4), e.writeDoubleBE = t.bind(null, n, 4,
						0), e.readDoubleLE = r.bind(null, s, 0, 4), e.readDoubleBE = r.bind(null, a,
							4, 0)
				}(), e
			}

			function i(e, t, r) {
				t[r] = 255 & e, t[r + 1] = e >>> 8 & 255, t[r + 2] = e >>> 16 & 255, t[r + 3] = e >>> 24
			}

			function n(e, t, r) {
				t[r] = e >>> 24, t[r + 1] = e >>> 16 & 255, t[r + 2] = e >>> 8 & 255, t[r + 3] = 255 & e
			}

			function s(e, t) {
				return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0
			}

			function a(e, t) {
				return (e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]) >>> 0
			}
			e.exports = o(o)
		},
		function(e, t, r) {
			"use strict";
			e.exports = function(e, t) {
				var r = new Array(arguments.length - 1),
					o = 0,
					i = 2,
					n = !0;
				for (; i < arguments.length;) r[o++] = arguments[i++];
				return new Promise((function(i, s) {
					r[o] = function(e) {
						if (n)
							if (n = !1, e) s(e);
							else {
								for (var t = new Array(arguments.length - 1), r =
									0; r < t.length;) t[r++] = arguments[r];
								i.apply(null, t)
							}
					};
					try {
						e.apply(t || null, r)
					} catch (e) {
						n && (n = !1, s(e))
					}
				}))
			}
		},
		function(e, t, r) {
			"use strict";

			function o() {
				this._listeners = {}
			}
			e.exports = o, o.prototype.on = function(e, t, r) {
				return (this._listeners[e] || (this._listeners[e] = [])).push({
					fn: t,
					ctx: r || this
				}), this
			}, o.prototype.off = function(e, t) {
				if (void 0 === e) this._listeners = {};
				else if (void 0 === t) this._listeners[e] = [];
				else
					for (var r = this._listeners[e], o = 0; o < r.length;) r[o].fn === t ? r.splice(
						o, 1) : ++o;
				return this
			}, o.prototype.emit = function(e) {
				var t = this._listeners[e];
				if (t) {
					for (var r = [], o = 1; o < arguments.length;) r.push(arguments[o++]);
					for (o = 0; o < t.length;) t[o].fn.apply(t[o++].ctx, r)
				}
				return this
			}
		},
		function(e, t, r) {
			"use strict";
			var o = e.exports,
				i = o.isAbsolute = function(e) {
					return /^(?:\/|\w+:)/.test(e)
				},
				n = o.normalize = function(e) {
					var t = (e = e.replace(/\\/g, "/").replace(/\/{2,}/g, "/")).split("/"),
						r = i(e),
						o = "";
					r && (o = t.shift() + "/");
					for (var n = 0; n < t.length;) ".." === t[n] ? n > 0 && ".." !== t[n - 1] ? t
						.splice(--n, 2) : r ? t.splice(n, 1) : ++n : "." === t[n] ? t.splice(n, 1) : ++
						n;
					return o + t.join("/")
				};
			o.resolve = function(e, t, r) {
				return r || (t = n(t)), i(t) ? t : (r || (e = n(e)), (e = e.replace(
					/(?:\/|^)[^/]+$/, "")).length ? n(e + "/" + t) : t)
			}
		},
		function(e, t, r) {
			"use strict";
			var o = r(0);
			Object.defineProperty(t, "__esModule", {
				value: !0
			}), t.default = void 0;
			var i, n, s, a, u = o(r(4)),
				l = (0, o(r(7)).default)(),
				c = "undefined" != typeof FormData,
				p = "undefined" != typeof Blob,
				h = (!1).overrideMimeType || !1,
				d = c,
				f = d || !1,
				y = p || h,
				m = function() {},
				g = "web",
				v = "wx",
				_ = "zfb",
				N = "tt",
				E = "baidu",
				O = "uni",
				b = function(e) {
					for (var t = ["canIUse", "getSystemInfo"], r = 0, o = t.length; r < o; r++) {
						if (!e[t[r]]) return !1
					}
					return !0
				};
			Object.keys || (Object.keys = (i = Object.prototype.hasOwnProperty, n = !{
				toString: null
			}.propertyIsEnumerable("toString"), a = (s = ["toString", "toLocaleString",
				"valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
				"constructor"
			]).length, function(e) {
				if ("object" !== (0, u.default)(e) && ("function" != typeof e || null ===
					e)) throw new TypeError("Object.keys called on non-object");
				var t, r, o = [];
				for (t in e) i.call(e, t) && o.push(t);
				if (n)
					for (r = 0; r < a; r++) i.call(e, s[r]) && o.push(s[r]);
				return o
			}));
			var T = {
					hasFormData: c,
					hasBlob: p,
					emptyfn: m,
					isCanSetRequestHeader: !0,
					hasOverrideMimeType: h,
					isCanUploadFileAsync: d,
					isCanUploadFile: f,
					isCanDownLoadFile: y,
					isSupportWss: !0,
					hasFlash: !1,
					xmlrequest: !1,
					stringify: function(e) {
						if ("undefined" != typeof JSON && JSON.stringify) return JSON.stringify(e);
						var t = "",
							r = [];
						return function e(o) {
							var i = !1;
							for (var n in "[object Array]" === Object.prototype.toString.call(
									o) ? (r.push("]", "["), i = !0) : "[object Object]" ===
									Object.prototype.toString.call(o) && r.push("}", "{"), o)
								"[object Null]" === Object.prototype.toString.call(o[n]) ? o[
								n] = "null" : "[object Undefined]" === Object.prototype.toString
								.call(o[n]) && (o[n] = "undefined"), o[n] && "object" === (0, u
									.default)(o[n]) ? t += "," + (i ? "" : '"' + n + '":' + (i ?
									'"' : "")) + e(o[n]) : t += ',"' + (i ? "" : n + '":"') + o[
									n] + '"';
							return "" != t && (t = t.slice(1)), r.pop() + t + r.pop()
						}(e)
					},
					login: function(e) {
						var t = (e = e || {}).success || m,
							r = e.error || m,
							o = (e.appKey || "").split("#");
						if (2 !== o.length) return r({
							type: l.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR
						}), !1;
						var i = o[0],
							n = o[1],
							s = s || e.https,
							a = e.user || "",
							u = e.pwd || "",
							c = e.apiUrl,
							p = {
								grant_type: "password",
								username: a,
								password: u,
								timestamp: +new Date
							};
						e = {
							url: c + "/" + i + "/" + n + "/token",
							dataType: "json",
							data: T.stringify(p),
							success: t,
							error: r
						};
						return T.ajax(e)
					},
					getFileUrl: function(e) {
						var t = {
								url: "",
								filename: "",
								filetype: "",
								data: ""
							},
							r = "string" == typeof e ? document.getElementById(e) : e;
						if (!T.isCanUploadFileAsync || !r) return t;
						try {
							if (window.URL.createObjectURL) {
								var o = r.files;
								if (o.length > 0) {
									var i = o.item(0);
									t.data = i, t.url = window.URL.createObjectURL(i), t.filename =
										i.name || ""
								}
							} else {
								i = document.getElementById(e).value;
								t.url = i;
								var n = i.lastIndexOf("/"),
									s = i.lastIndexOf("\\"),
									a = Math.max(n, s);
								t.filename = a < 0 ? i : i.substring(a + 1)
							}
							var u = t.filename.lastIndexOf(".");
							return -1 != u && (t.filetype = t.filename.substring(u + 1)
							.toLowerCase()), t
						} catch (e) {
							throw e
						}
					},
					getFileSize: function(e) {
						var t = document.getElementById(e),
							r = 0;
						return t && t.files && t.files.length > 0 && (r = t.files[0].size), r
					},
					trim: function(e) {
						return (e = "string" == typeof e ? e : "").trim ? e.trim() : e.replace(
							/^\s|\s$/g, "")
					},
					parseLink: function(e) {
						return e = e.replace(
							/(https?\:\/\/|www\.)([a-zA-Z0-9-]+(\.[a-zA-Z0-9]+)+)(\:[0-9]{2,4})?\/?((\.[:_0-9a-zA-Z-]+)|[:_0-9a-zA-Z-]*\/?)*\??[:_#@*&%0-9a-zA-Z-/=]*/gm,
							(function(e) {
								return "<a href='" + (/^https?/gm.test(e) ? e : "//" + e) +
									"' target='_blank'>" + e + "</a>"
							}))
					},
					parseJSON: function(e) {
						if (window.JSON && window.JSON.parse) return window.JSON.parse(e + "");
						var t, r = null,
							o = T.trim(e + "");
						return o && !T.trim(o.replace(
							/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,
							(function(e, o, i, n) {
								return t && o && (r = 0), 0 === r ? e : (t = i || o,
									r += !n - !i, "")
							}))) ? Function("return " + o)() : Function("Invalid JSON: " + e)()
					},
					parseUploadResponse: function(e) {
						return e.indexOf("callback") > -1 ? e.slice(9, -1) : e
					},
					parseDownloadResponse: function(e) {
						return e && e.type && "application/json" === e.type || 0 > Object.prototype
							.toString.call(e).indexOf("Blob") ? this.url + "?token=" : window.URL
							.createObjectURL(e)
					},
					uploadFile: function(e) {
						(e = e || {}).onFileUploadProgress = e.onFileUploadProgress || m, e
							.onFileUploadComplete = e.onFileUploadComplete || m, e
							.onFileUploadError = e.onFileUploadError || m, e.onFileUploadCanceled =
							e.onFileUploadCanceled || m;
						var t = e.accessToken || this.context.accessToken;
						if (t) {
							var r, o, i, n = e.appKey || this.context.appKey || "";
							if (n && (r = (i = n.split("#"))[0], o = i[1]), r || o) {
								var s = e.apiUrl;
								!this.isHttpDNS && s || (s = this.apiUrl);
								var a = e.uploadUrl || s + "/" + r + "/" + o + "/chatfiles";
								if (T.isCanUploadFileAsync)
									if ((e.file.data ? e.file.data.size : void 0) <= 0) e
										.onFileUploadError({
											type: l.WEBIM_UPLOADFILE_ERROR,
											id: e.id
										});
									else {
										var u = T.xmlrequest();
										u.upload && u.upload.addEventListener("progress", e
											.onFileUploadProgress, !1), u.addEventListener ? (u
											.addEventListener("abort", e.onFileUploadCanceled, !
												1), u.addEventListener("load", (function(t) {
												try {
													var r = T.parseJSON(u.responseText);
													try {
														e.onFileUploadComplete(r)
													} catch (t) {
														e.onFileUploadError({
															type: l
																.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
															data: t
														})
													}
												} catch (t) {
													e.onFileUploadError({
														type: l
															.WEBIM_UPLOADFILE_ERROR,
														data: u.responseText,
														id: e.id,
														xhr: u
													})
												}
											}), !1), u.addEventListener("error", (function(t) {
												e.onFileUploadError({
													type: l
														.WEBIM_UPLOADFILE_ERROR,
													id: e.id,
													xhr: u
												})
											}), !1)) : u.onreadystatechange && (u
											.onreadystatechange = function() {
												if (4 === u.readyState)
													if (200 === ajax.status) try {
														var t = T.parseJSON(u.responseText);
														e.onFileUploadComplete(t)
													} catch (t) {
														e.onFileUploadError({
															type: l
																.WEBIM_UPLOADFILE_ERROR,
															data: u.responseText,
															id: e.id,
															xhr: u
														})
													} else e.onFileUploadError({
														type: l
															.WEBIM_UPLOADFILE_ERROR,
														data: u.responseText,
														id: e.id,
														xhr: u
													});
													else u.abort(), e.onFileUploadCanceled()
											}), u.open("POST", a), u.setRequestHeader(
											"restrict-access", "true"), u.setRequestHeader(
											"Accept", "*/*"), u.setRequestHeader(
											"Authorization", "Bearer " + t);
										var c = new FormData;
										c.append("file", e.file.data), window.XDomainRequest && (u
											.readyState = 2), u.send(c)
									}
								else T.hasFlash && "function" == typeof e.flashUpload ? e
									.flashUpload && e.flashUpload(a, e) : e.onFileUploadError({
										type: l.WEBIM_UPLOADFILE_BROWSER_ERROR,
										id: e.id
									})
							} else e.onFileUploadError({
								type: l.WEBIM_UPLOADFILE_ERROR,
								id: e.id
							})
						} else e.onFileUploadError({
							type: l.WEBIM_UPLOADFILE_NO_LOGIN,
							id: e.id
						})
					},
					download: function(e) {
						e.onFileDownloadComplete = e.onFileDownloadComplete || m, e
							.onFileDownloadError = e.onFileDownloadError || m;
						var t = e.accessToken || this.context.accessToken,
							r = T.xmlrequest();
						if (t) {
							if (T.isCanDownLoadFile) {
								"addEventListener" in r ? (r.addEventListener("load", (function(t) {
									e.onFileDownloadComplete(r.response, r)
								}), !1), r.addEventListener("error", (function(t) {
									e.onFileDownloadError({
										type: l.WEBIM_DOWNLOADFILE_ERROR,
										id: e.id,
										xhr: r
									})
								}), !1)) : "onreadystatechange" in r && (r.onreadystatechange =
									function() {
										4 === r.readyState ? 200 === ajax.status ? e
											.onFileDownloadComplete(r.response, r) : e
											.onFileDownloadError({
												type: l.WEBIM_DOWNLOADFILE_ERROR,
												id: e.id,
												xhr: r
											}) : (r.abort(), e.onFileDownloadError({
												type: l.WEBIM_DOWNLOADFILE_ERROR,
												id: e.id,
												xhr: r
											}))
									});
								var o = e.method || "GET",
									i = e.responseType || "blob",
									n = e.mimeType || "text/plain; charset=x-user-defined";
								r.open(o, e.url), "undefined" != typeof Blob ? r.responseType = i :
									r.overrideMimeType(n);
								var s = {
										"X-Requested-With": "XMLHttpRequest",
										Accept: "application/octet-stream",
										"share-secret": e.secret,
										Authorization: "Bearer " + t
									},
									a = e.headers || {};
								for (var u in a) s[u] = a[u];
								for (var u in s) s[u] && r.setRequestHeader(u, s[u]);
								window.XDomainRequest && (r.readyState = 2), r.send(null)
							} else e.onFileDownloadComplete()
						} else e.onFileDownloadError({
							type: l.WEBIM_DOWNLOADFILE_NO_LOGIN,
							id: e.id
						})
					},
					parseTextMessage: function(e, t) {
						if ("string" == typeof e) {
							if ("[object Object]" !== Object.prototype.toString.call(t)) return {
								isemoji: !1,
								body: [{
									type: "txt",
									data: e
								}]
							};
							var r = e,
								o = [],
								i = r.match(/\[[^[\]]{2,3}\]/gm);
							if (!i || i.length < 1) return {
								isemoji: !1,
								body: [{
									type: "txt",
									data: e
								}]
							};
							for (var n = !1, s = 0; s < i.length; s++) {
								var a = r.substring(0, r.indexOf(i[s])),
									u = t.map[i[s]];
								if (a && o.push({
										type: "txt",
										data: a
									}), u) {
									var l = t.map ? t.path + u : null;
									l ? (n = !0, o.push({
										type: "emoji",
										data: l
									})) : o.push({
										type: "txt",
										data: i[s]
									});
									var c = r.indexOf(i[s]) + i[s].length;
									r = r.substring(c)
								} else o.push({
									type: "txt",
									data: i[s]
								})
							}
							return r && o.push({
								type: "txt",
								data: r
							}), n ? {
								isemoji: n,
								body: o
							} : {
								isemoji: !1,
								body: [{
									type: "txt",
									data: e
								}]
							}
						}
					},
					ajax: function(e) {
						return new Promise((function(t, r) {
							var o = e.success || m,
								i = e.error || m,
								n = e.type || "POST",
								s = e.data || null,
								a = "",
								u = T.getEnvInfo();
							if ("get" === n.toLowerCase() && s) {
								for (var l in s) s.hasOwnProperty(l) && (a += l + "=" +
									s[l] + "&");
								a = a ? a.slice(0, -1) : a, e.url += (e.url.indexOf(
										"?") > 0 ? "&" : "?") + (a ? a + "&" : a) +
									"_v=" + (new Date).getTime(), s = null, a = null
							}
							var c = {
								url: e.url,
								data: e.data,
								method: n,
								success: function(e) {
									"200" == e.statusCode || "200" == e.status ?
										(o(e.data), t(e.data)) : (i(e), r(e))
								},
								complete: function() {},
								fail: function(e) {
									i(e), r(e)
								}
							};
							"zfb" === u.platform ? c.headers = e.headers : c.header = e
								.headers, u.global.request(c)
						}))
					},
					ts: function() {
						var e = new Date,
							t = e.getHours(),
							r = e.getMinutes(),
							o = e.getSeconds();
						return (t < 10 ? "0" + t : t) + ":" + (r < 10 ? "0" + r : r) + ":" + (o <
							10 ? "0" + o : o) + ":" + e.getMilliseconds() + " "
					},
					getObjectKey: function(e, t) {
						for (var r in e)
							if (e[r] == t) return r;
						return ""
					},
					sprintf: function() {
						var e, t, r = arguments,
							o = r[0] || "";
						for (e = 1, t = r.length; e < t; e++) o = o.replace(/%s/, r[e]);
						return o
					},
					reverse: function(e) {
						var t = [];
						if (Array.prototype.reverse) t = e.reverse();
						else
							for (var r = 0; r < e.length; r++) t.unshift(e[r]);
						return t
					},
					getEnv: function() {
						var e = !0;
						try {
							e = !window || !navigator
						} catch (t) {
							e = !0
						}
						return e
					},
					getEnvInfo: function() {
						return "undefined" != typeof swan && b(swan) ? {
							platform: E,
							global: swan
						} : "undefined" != typeof tt && b(tt) ? {
							platform: N,
							global: tt
						} : "undefined" != typeof my && b(my) ? {
							platform: _,
							global: my
						} : "undefined" != typeof wx && b(wx) ? {
							platform: v,
							global: wx
						} : "undefined" != typeof uni && b(uni) ? {
							platform: O,
							global: uni
						} : {
							platform: g,
							global: uni
						}
					},
					checkArray: function(e, t) {
						var r = "off";
						if (e.forEach((function(e, o) {
								if (e.name === t.name) return r = "on", o
							})), "off" == r) return !1
					},
					_listenNetwork: function(e, t) {}
				},
				I = T;
			t.default = I
		}
	])
}));
